Skip to content
Agent Workspaces
Skill

/context-chips

Port or rebuild ANA's context chips — the Chip mode toggle that lets the user tap any on-screen item to attach it to the next chat message, the ✎ draw button that lets them circle things on the screen and send an annotated screenshot plus the items under the marks, and the ⟳

From plugin
ana
1479 skills

Claude Code

$ npx -y skills add tykimos/agent-native-agent --skill context-chips --agent claude-code

SKILL.md

context-chips.SKILL.md
name: context-chips
description: Port or rebuild ANA's context chips — the Chip mode toggle that lets the user tap any on-screen item to attach it to the next chat message, the ✎ draw button that lets them circle things on the screen and send an annotated screenshot plus the items under the marks, and the ⟳ rescan button that registers newly added UI elements as chip targets. Use when the user says "컨텍스트 칩", "칩 모드", "그리기 버튼", "화면에 표시해서 보내기", "annotation", "요소 추가", "새로고침 버튼으로 칩 등록", or when ana-update reports context-chips / context-draw missing.

context-chips — point at the screen instead of describing it

The user shouldn't have to type "the second task on the Tasks tab". They switch on **Chip**, tap the thing, and it rides along with the next message. Or they draw on the screen.

UX spec

[logo] Work Requests Evolve PRD Update   ( ◉ Chip ) (✎) (⟳) (A)
                                          │    │    └ profile, always right-aligned
                                          │    └ rescan: register new on-screen elements as chip targets
                                          └ draw: only shown while Chip is on, placed BEFORE ⟳
  • **Chip toggle:** a switch. While on, chip-able items get a subtle affordance (outline on hover/tap target). Tapping an item adds a chip above the chat input: `[Task] Book the venue ✕`. Tapping it again removes the chip. Chips are sent as a `Context:` block (`- [Kind] text`), and the chat log view turns them back into chips on the user's bubble.
  • **Screen chip:** there's always one chip describing the view: tab, scroll position, viewport size.
  • **✎ Draw (annotation):** covers the page with a canvas. The bar at the bottom has pen colors **red `#FF0000`, magenta `#FF00FF`, blue `#0000FF`**: pure hues the model recognizes reliably. Strokes are 5px color over a 9px white outline so they read on any background. Buttons: **Undo / Cancel / Add to chat**. Mostly used to circle things, like annotating a slide.
  • **Add to chat:**

1. Captures the page (`modern-screenshot`, served locally at `/vendor/modern-screenshot.mjs`) and composites the strokes on top. The capture is planned first (`shotPlan`): elements outside the visible part of `#main` are not cloned — ones above it stay as empty boxes of the same height so positions hold, ones below or beside are dropped — and only the style properties in `SHOT_PROPS` are copied. A 15,000-element list went from ~50 s to ~1 s. `features.restoreScrollPosition` is on (the library's default is off, which captured the top of a scrolled list), image loads time out at 8 s, and Safari's re-draw loop is capped at 3. **iframes** are captured separately: the library pastes the whole framed document in place of the frame, so its own scroll was lost. The page capture drops each visible `<iframe>` (filter) and keeps a same-size placeholder in the clone (a 0×0 absolute `[data-shot-ph]` sibling in the live DOM, sized in `onCloneNode`); then each same-origin frame's `documentElement` is captured at the frame's client size (the library restores the document scroll) and drawn over the placeholder. Cross-origin frames stay as a blank box. 1. The attachment chip shows the stages with a percentage: *Loading tool 2% → Reading N nodes 8% → Fetching images c/n 50–70% → Rendering 72% → Marking 86% → Compressing 90% → Uploading 92–100%* (`ph.pctBase` lets `attachFiles` continue the bar instead of restarting at 0). The clone step is synchronous, so each stage yields a frame first so the chip repaints. A stage that lasts 3 s or more shows its elapsed time (*Rendering · 12s*); one that lasts 40 s is cut off (`guard`) with *Screen capture stuck at "Rendering" for 40 s — sent the marks only*; each stage's time is logged to the console as `[capture] <stage> <ms>`. 2. Uploads the result as `annotation-<tab>-<ts>.png` (JPEG if > 8 MB). 3. Adds chips for the items under the marks (`drawTargetsUnder`), with the draw layer set to `pointer-events: none` while probing with `elementFromPoint`. 4. The Screen chip says "red marks … annotated screenshot attached — look for the red pen marks (white-outlined)". 5. **On mobile the chat opens immediately.** 6. If capture fails, it falls back to the chips plus an error line; never a silent failure.

  • **⟳ Rescan:** the chip target list (`CAP`) is hand-written, so UI added later isn't chip-able. Rescan walks every `#main section.view` and finds "unit-looking" elements not covered by `CAP` (not containers, not control-only). It registers class-based selectors (`selectorFor`), so they survive re-renders, and stores them in `localStorage['ana-chip-extra']`. It then flashes the new ones (`.chip-new`) and toasts "N new element types".

Anchors / code (upstream `dashboard.html`)

| What | Anchors | |---|---| | Toggle + buttons | `#modeToggle`, `#drawBtn`, `#chipScanBtn`, `function setMode` | | Chip state & message | `contextChips`, `function renderChips`, `function addChip`, `function clearChips`, `function buildMessage` | | Targets | `const CAP = [...]` (selector, kind, text getter), `function applyChipAffordance`, `function scanChipTargets`, `function registerChipTarget`, `function loadChipExtra`, `function selectorFor`, `function isControlOnly`, `function coveredByCap` | | Draw | `#drawLayer`, `#drawCanvas`, `#drawUndo #drawCancel #drawDone`, `function openDraw`, `function closeDraw`, `function drawRepaint`, `function drawTargets`, `function drawTargetsUnder` | | Server | `/vendor/modern-screenshot.mjs` route (serves `node_modules/modern-screenshot/dist/index.mjs`), npm dep `modern-screenshot` |

Porting into an existing ANA

1. `npm i modern-screenshot`, then add the `/vendor/modern-screenshot.mjs` route to the extraApi module. Uploads need `/api/upload`; port `chat-attachments` from chat-window first if it's missing. 2. Copy the header buttons (`#modeToggle`, `#drawBtn`, `#chipScanBtn`) into the target's header, before its profile button. Copy the CSS for `.mode-toggle`, `.chip*`, `.d

Read more
@tykimos
Ships withana

Self-hosted apps you operate by watching a dashboard and talking to a coding agent that IS the runtime — it proposes, applies, and evolves the app live. Built for Claude Code and MCP.

Stars on GitHub

Momentum

stars in total
147
Star history of tykimos/agent-native-agent on GitHub, a chart by star-history.com

Other skills on ana.

agent-requests

agent-requests

Port ANA's Requests, Evolve, PRD and Knowledge tabs — Requests (what the agent needs from the user — pending data-change diffs,…

@tykimos@tykimosInstall Skill
ana-update

ana-update

Bring an existing, customized ANA up to date with the latest upstream ANA (github.com/tykimos/agent-native-agent) feature by…

@tykimos@tykimosInstall Skill
ana

ana

Attach ANA (Agent-Native Agent) to an existing web app or service so the user can operate it by watching a dashboard and chatting…

@tykimos@tykimosInstall Skill
app-shell

app-shell

Port ANA's app shell — one workspace, six tabs in a menu under the ANA logo (PRD with Current / History, Work with a sub-tab per…

@tykimos@tykimosInstall Skill
chat-window

chat-window

Port or rebuild the ANA chat window so it looks and behaves like the Claude app — full-width session combo, user bubbles +…

@tykimos@tykimosInstall Skill
cloud-setting

cloud-setting

Provision and wire up a cloud VM as an ANA (Agent-Native Agent) host end-to-end — create an Azure VM (az CLI), record its…

@tykimos@tykimosInstall Skill

More skills from other plugins.

hud

hud

Set up, check, change, preview, or report a problem with the claude-hud status line. Use when the user mentions the HUD or status…

@jarrodwatts@jarrodwattsInstall Skill
paseo

paseo

Paseo reference for managing hosts, projects, workspaces, workspace scripts, agents, schedules, and heartbeats.

paseo7d24k
@getpaseo@getpaseoInstall Skill
10x
Auto-invoked

10x

Personalized audit that teaches the advanced Paradev (formerly Superset) features the user isn't using yet (automations, parallel…

paradev5d16k
@superset-sh@superset-shInstall Skill

Questions about context-chips.

Which coding agents can use context-chips?
context-chips installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.