focus

focus is a skill for Claude Code, Codex from yanfeid/claude-amber. It costs 66 tokens per session (484 once invoked), scanned A, original, MIT.

A focus contract that limits an agent’s work to selected files and defines when the task is finished.

In plain words
What is it for?
Use it at the start of a task or when work is drifting, to record the allowed paths, excluded areas, and completion criteria.
Why use it?
It reduces wasted context and prevents broad exploration of unrelated parts of a codebase.

Skill for Claude CodeCodex

Part of the amber plugin — 4 skills, 3 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/yanfeid/claude-amber/focus
Any agent
npx skills add yanfeid/claude-amber --skill focus
Clone the repo
git clone --depth 1 https://github.com/yanfeid/claude-amber

Made for: Claude Code, Codex.

Or install amber, the plugin that ships this one along with the rest of its 4 skills, 3 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for focus

README.md
[![agentmods](https://agentmods.dev/badge/skills/yanfeid/claude-amber/focus.svg)](https://agentmods.dev/skills/yanfeid/claude-amber/focus)
Your own site
<a href="https://agentmods.dev/skills/yanfeid/claude-amber/focus"><img src="https://agentmods.dev/badge/skills/yanfeid/claude-amber/focus.svg" alt="Measured on agentmods" height="20"></a>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 484 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00066 $0.00484
Opus 5 $0.00033 $0.00242
Sonnet 5 $0.00013 $0.00097
Haiku 4.5 $0.00007 $0.00048

Measured 5d ago against content hash 7f1d5d632cf8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

focus scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/focus/SKILL.md · 42 lines

What it actually says

/amber:focus — set a focus contract

The user wants to work on: $ARGUMENTS

A focus contract is how this session stays cheap and sharp. Big contexts make models dumber (context rot) and die in compaction. Your job now:

1. Define the scope

From the task description (ask one clarifying question only if genuinely ambiguous), determine:

  • In-scope paths: the files/directories this task will actually touch. Be narrow. Use Glob/Grep to identify them — do not read whole files yet.
  • Out-of-scope: everything else, named explicitly if the user has been drifting there.
  • Done criteria: 1–3 checkable statements for what "finished" means.

2. Write the contract

Write .amber/FOCUS.md in the project root (create the directory if needed):

# Focus contract
- Task: <one sentence>
- In scope: <paths/globs>
- Out of scope: <paths or topics, if relevant>
- Done when: <checkable criteria>
- Set: <ISO date>

Keep it under 20 lines. This file is re-injected after every compaction, so every line costs tokens forever — earn each one.

3. Obey the contract for the rest of the session

  • Read only in-scope files, and only the parts you need (offset/limit on large files).
  • When you need broad codebase knowledge (where is X defined, how is Y used everywhere), delegate to an Explore subagent and consume only its conclusion — never pull file dumps into the main context.
  • If the user asks for something out of scope, do it, but say so and offer to update the contract.
  • When the task's done criteria are met, say so and suggest /amber:checkpoint if the session continues.

Confirm the contract to the user in 2–3 sentences, then start the task.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 42 lines · 66 tokens per session scan A 7f1d5d632cf8

Subscribe to this mod's changes

focus is a skill published in the GitHub repository yanfeid/claude-amber (2 stars, last pushed 2mo ago), licensed MIT. It adds 66 tokens to every session and 484 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

browser-qa

Use to exercise the running app in a real browser — after UI changes, before ship, or when the user asks to QA the site, smoke-test a branch, or check "does it actually work". Drives affected routes headlessly via Playwright, captures console errors, failed requests, and screenshots, and produces a report with a…

AbdurRafay2004/handoff · 85 tokens

debug

Use when encountering any bug, test failure, unexpected behavior, or performance regression — before proposing any fix. Root-cause discipline plus a feedback-loop method; applies at every tier.

AbdurRafay2004/handoff · 38 tokens

ship

Use when work is verified and ready to leave the machine — branch/PR/merge/deploy/smoke-check. Triggers on "ship it", "deploy", "merge the PR", "push this", "release", "go live", "cutover". Covers git hygiene, PR and merge discipline, deploy-target detection (Cloudflare Workers/Pages via wrangler, Vercel, Convex…

AbdurRafay2004/handoff · 105 tokens

architecture

Scan the codebase for architectural friction and propose deepening opportunities as candidate cards, then interrogate the chosen one into a decision. Two entry points — proactive, when the user asks "improve the architecture" or "why is this codebase painful to work in"; reactive, when the debug skill's "3+ failed…

AbdurRafay2004/handoff · 94 tokens

design

Use when designing or improving a module's interface, deciding where a seam goes, making code more testable or navigable, or pinning down domain terminology. Provides the deep-module vocabulary other skills lean on.

AbdurRafay2004/handoff · 44 tokens

learn

Use at the end of T3 work, after an incident/rollback, or when the user asks for a retro — turns what happened into recorded learnings that live in the repo (CHANGELOG entry, typed LEARNINGS.md entries, follow-up tasks, and — only with explicit user approval — new RULES).

AbdurRafay2004/handoff · 66 tokens