Agent Skills › Remocn/remocn

Remocn/remocn

GitHub

作为技能路由器,指导用户根据场景选择合适的工作流。涵盖从构思到交付的主流程,支持原型验证、多会话拆分及独立测试审查,并提供缺陷分流入口,旨在优化AI辅助开发的上下文管理与执行路径。

78 skills 995

Install All Skills

npx skills add Remocn/remocn --all -g -y
More Options

List skills in collection

npx skills add Remocn/remocn --list

Skills in Collection (78)

作为技能路由器,指导用户根据场景选择合适的工作流。涵盖从构思到交付的主流程,支持原型验证、多会话拆分及独立测试审查,并提供缺陷分流入口,旨在优化AI辅助开发的上下文管理与执行路径。
不确定该使用哪个开发技能或流程 需要从想法到代码的完整工作流指导 处理堆积的Bug或需求需要分流
.agents/skills/ask-matt/SKILL.md
npx skills add Remocn/remocn --skill ask-matt -g -y
SKILL.md
Frontmatter
{
    "name": "ask-matt",
    "description": "Ask which skill or flow fits your situation. A router over the skills in this repo.",
    "disable-model-invocation": true
}

Ask Matt

You don't remember every skill, so ask.

A flow is a path through the skills. Most paths run along one main flow, and two on-ramps merge onto it. Everything else is standalone, or a vocabulary layer that runs underneath.

The main flow: idea → ship

The route most work travels. You have an idea and want it built.

  1. /grill-with-docs — sharpen the idea by interview. Start here when you have a codebase: it's stateful, retaining what it learns in CONTEXT.md and ADRs. (No codebase? Use /grill-me — see Standalone. Both run the same /grilling primitive; grill-with-docs is the one that leaves a paper trail.)

  2. Branch — can you settle every question in conversation? If a question needs a runnable answer (state, business logic, a UI you have to see), detour through a prototype, bridged by /handoff in both directions (see Crossing sessions):

    • /handoff out, then open a fresh session against that file,
    • /prototype to answer the question with throwaway code,
    • /handoff back what you learned, and reference it from the original idea thread.
  3. Branch — is this a multi-session build?

    • Yes/to-spec (turn the thread into a spec), then /to-tickets to split it into tracer-bullet tickets, each declaring its blocking edges. On a local tracker that's an ordered tickets.md you work by hand; on a real tracker the edges become native blocking links, so any ticket whose blockers are done can be grabbed — kick off /implement per ticket, clearing context between each one.
    • No/implement right here, in the same context window.

    Either way, /implement builds each issue by driving /tdd internally — one red-green slice at a time — then closes out by running /code-review, a two-axis review (Standards + Spec) of the diff, before committing. Reach for /tdd on its own when you just want to build a concrete behaviour test-first without a full spec, and /code-review on its own whenever you want to review a branch or PR against a fixed point.

Context hygiene

Keep steps 1–3 in one unbroken context window — don't compact or clear until after /to-tickets — so the grilling, spec, and tickets all build on the same thinking. Each /implement then starts fresh, working from the ticket.

The limit on this is the smart zone: the window (~120k tokens on state-of-the-art models) within which the model still reasons sharply. If a session approaches it before /to-tickets, don't push on degraded — /handoff and continue in a fresh thread.

On-ramps

A starting situation that generates work, then merges onto the main flow.

  • Bugs and requests piling up/triage. It moves issues through triage roles and produces agent-ready issues, which /implement later picks up.

    Triage is only for issues you didn't create — bug reports, incoming feature requests, anything that arrives raw. Tickets that /to-tickets produced are already agent-ready, so don't triage them.

  • Something's broken/diagnosing-bugs. For the hard ones: the bug that resists a first glance, the intermittent flake, the regression that crept in between two known-good states. It refuses to theorise until it has a tight feedback loop — one command that already goes red on this bug — then fixes with a regression test. Its post-mortem hands off to /improve-codebase-architecture when the real finding is that there's no good seam to lock the bug down.

  • A huge, foggy effort — a greenfield project or a huge feature build, too big for one session/wayfinder. When the way from here to the destination isn't visible yet, it charts a shared map of investigation tickets on the issue tracker and resolves them one at a time — producing decisions, not deliverables — until the fog is pushed back and the way is clear. Then it merges onto the main flow at /to-spec (or, if the effort turned out small enough, straight to /implement). Where /grill-with-docs sharpens an idea you can hold in one session, wayfinder is for the idea you can't.

Codebase health

Not feature work — upkeep.

  • /improve-codebase-architecture — run whenever you have a spare moment to keep the codebase good for agents to operate in. It surfaces deepening opportunities; picking one generates an idea you can take into the main flow at /grill-with-docs. It's the survey that finds the candidates; /codebase-design (below) is the bench you design the chosen one on.

Vocabulary underneath

Two model-invoked references that run beneath the other skills — each the single source of truth for its vocabulary. Reach for them directly when the words, not the process, are the problem; or let the skills above pull them in.

  • /domain-modeling — sharpen the project's domain language: challenge a fuzzy term, resolve an overloaded word ("account" doing three jobs), record a hard-to-reverse decision as an ADR. It's the active discipline /grill-with-docs drives to keep CONTEXT.md a clean glossary.
  • /codebase-design — the deep-module vocabulary (module, interface, depth, seam, adapter, leverage, locality) for designing a module's shape: a lot of behaviour behind a small interface at a clean seam. /tdd and /improve-codebase-architecture both speak it.

Crossing sessions

  • /handoff — when a thread is full or you need to branch off (e.g. into a /prototype session), this compacts the conversation into a markdown file. You don't continue in place — you open a new session and reference that file to carry the context across. It's the bridge between context windows, in either direction. Use it when you want a fresh session but need the current conversation preserved.
  • /compact (built-in) — stay in the same conversation, letting the earlier turns be summarized. Use it at intentional breaks between phases, when you don't mind losing the verbatim history. Don't compact mid-phase — the agent can lose its way. /handoff forks; /compact continues.

Standalone

Off the main flow entirely.

  • /grill-me — the same relentless interview as /grill-with-docs, but for when you have no codebase. Stateless: it saves nothing locally, builds no CONTEXT.md. Reach for it to sharpen any plan or design that doesn't live in a repo.
  • /prototype — a small, throwaway program that answers one design question: does this state model feel right, or what should this UI look like. Throwaway from day one — keep the answer, delete the code. It's the detour in step 2 of the main flow, but reach for it any time a design question is hard to settle on paper.
  • /research — delegate reading legwork to a background agent: it investigates a question against primary sources, then leaves a cited Markdown file in the repo. Keep working while it reads. The file it produces is something to take into the main flow at /grill-with-docs — research feeds the thinking, it doesn't replace it.
  • /teach — learn a concept over multiple sessions, using the current directory as a stateful workspace.
  • /writing-great-skills — reference for writing and editing skills well.

Precondition

/setup-matt-pocock-skills — run before your first engineering flow to configure the issue tracker, triage labels, and doc layout the other skills assume. Custom issue trackers also work.

将当前对话总结并移交至后台新 Agent 继续工作。生成包含建议技能的摘要,通过 claude --bg 命令启动新会话,自动脱敏敏感信息,引用现有文档而非重复内容,支持自定义名称和焦点描述。
用户要求将任务移交或交给后台代理处理 需要开启新的独立会话以继续当前工作
.agents/skills/claude-handoff/SKILL.md
npx skills add Remocn/remocn --skill claude-handoff -g -y
SKILL.md
Frontmatter
{
    "name": "claude-handoff",
    "description": "Hand the current conversation off to a fresh background agent that picks up the work immediately.",
    "argument-hint": "What will the next session be used for?",
    "disable-model-invocation": true
}

Write a handoff summary of the current conversation so a fresh agent can continue the work. Instead of saving it, launch a background agent seeded with the summary as its prompt: claude --bg --name "<descriptive name>" "<handoff summary>". It starts in the current working directory and returns immediately; the user manages it with claude agents.

Always pass -n/--name with a descriptive name (e.g. --name "Fix login bug") — it sets the display name shown in the job list, session picker, and terminal title.

Include a "suggested skills" section in the summary, which suggests skills that the agent should invoke.

Do not duplicate content already captured in other artifacts (PRDs, plans, ADRs, issues, commits, diffs). Reference them by path or URL instead.

Redact any sensitive information, such as API keys, passwords, or personally identifiable information — the summary becomes the agent's prompt.

If the user passed arguments, treat them as a description of what the next session will focus on and tailor the summary accordingly.

对代码变更进行双维度并行审查:标准合规性与需求一致性。支持指定固定点对比,自动识别规范源与编码标准(含Fowler异味检测),输出结构化报告。
用户要求审查分支或PR 用户询问自某提交/标签以来的变更 用户请求'review since X'
.agents/skills/code-review/SKILL.md
npx skills add Remocn/remocn --skill code-review -g -y
SKILL.md
Frontmatter
{
    "name": "code-review",
    "description": "Review the changes since a fixed point (commit, branch, tag, or merge-base) along two axes — Standards (does the code follow this repo's documented coding standards?) and Spec (does the code match what the originating issue\/PRD asked for?). Runs both reviews in parallel sub-agents and reports them side by side. Use when the user wants to review a branch, a PR, work-in-progress changes, or asks to \"review since X\"."
}

Two-axis review of the diff between HEAD and a fixed point the user supplies:

  • Standards — does the code conform to this repo's documented coding standards?
  • Spec — does the code faithfully implement the originating issue / PRD / spec?

Both axes run as parallel sub-agents so they don't pollute each other's context, then this skill aggregates their findings.

The issue tracker should have been provided to you — run /setup-matt-pocock-skills if docs/agents/issue-tracker.md is missing.

Process

1. Pin the fixed point

Whatever the user said is the fixed point — a commit SHA, branch name, tag, main, HEAD~5, etc. If they didn't specify one, ask for it.

Capture the diff command once: git diff <fixed-point>...HEAD (three-dot, so the comparison is against the merge-base). Also note the list of commits via git log <fixed-point>..HEAD --oneline.

Before going further, confirm the fixed point resolves (git rev-parse <fixed-point>) and the diff is non-empty. A bad ref or empty diff should fail here — not inside two parallel sub-agents.

2. Identify the spec source

Look for the originating spec, in this order:

  1. Issue references in the commit messages (#123, Closes #45, GitLab !67, etc.) — fetch via the workflow in docs/agents/issue-tracker.md.
  2. A path the user passed as an argument.
  3. A PRD/spec file under docs/, specs/, or .scratch/ matching the branch name or feature.
  4. If nothing is found, ask the user where the spec is. If they say there isn't one, the Spec sub-agent will skip and report "no spec available".

3. Identify the standards sources

Anything in the repo that documents how code should be written, such as CODING_STANDARDS.md or CONTRIBUTING.md.

On top of whatever the repo documents, the Standards axis always carries the smell baseline below — a fixed set of Fowler code smells (Refactoring, ch.3) that applies even when a repo documents nothing. Two rules bind it:

  • The repo overrides. A documented repo standard always wins; where it endorses something the baseline would flag, suppress the smell.
  • Always a judgement call. Each smell is a labelled heuristic ("possible Feature Envy"), never a hard violation — and, like any standard here, skip anything tooling already enforces.

Each smell reads what it ishow to fix; match it against the diff:

  • Mysterious Name — a function, variable, or type whose name doesn't reveal what it does or holds. → rename it; if no honest name comes, the design's murky.
  • Duplicated Code — the same logic shape appears in more than one hunk or file in the change. → extract the shared shape, call it from both.
  • Feature Envy — a method that reaches into another object's data more than its own. → move the method onto the data it envies.
  • Data Clumps — the same few fields or params keep travelling together (a type wanting to be born). → bundle them into one type, pass that.
  • Primitive Obsession — a primitive or string standing in for a domain concept that deserves its own type. → give the concept its own small type.
  • Repeated Switches — the same switch/if-cascade on the same type recurs across the change. → replace with polymorphism, or one map both sites share.
  • Shotgun Surgery — one logical change forces scattered edits across many files in the diff. → gather what changes together into one module.
  • Divergent Change — one file or module is edited for several unrelated reasons. → split so each module changes for one reason.
  • Speculative Generality — abstraction, parameters, or hooks added for needs the spec doesn't have. → delete it; inline back until a real need shows.
  • Message Chains — long a.b().c().d() navigation the caller shouldn't depend on. → hide the walk behind one method on the first object.
  • Middle Man — a class or function that mostly just delegates onward. → cut it, call the real target direct.
  • Refused Bequest — a subclass or implementer that ignores or overrides most of what it inherits. → drop the inheritance, use composition.

4. Spawn both sub-agents in parallel

Send a single message with two Agent tool calls. Use the general-purpose subagent for both.

Standards sub-agent prompt — include:

  • The full diff command and commit list.
  • The list of standards-source files you found in step 3, plus the smell baseline from step 3 pasted in full — the sub-agent has no other access to it.
  • The brief: "Report — per file/hunk where relevant — (a) every place the diff violates a documented standard: cite the standard (file + the rule); and (b) any baseline smell you spot: name it and quote the hunk. Distinguish hard violations from judgement calls — documented-standard breaches can be hard, but baseline smells are always judgement calls, and a documented repo standard overrides the baseline. Skip anything tooling enforces. Under 400 words."

Spec sub-agent prompt — include:

  • The diff command and commit list.
  • The path or fetched contents of the spec.
  • The brief: "Report: (a) requirements the spec asked for that are missing or partial; (b) behaviour in the diff that wasn't asked for (scope creep); (c) requirements that look implemented but where the implementation looks wrong. Quote the spec line for each finding. Under 400 words."

If the spec is missing, skip the Spec sub-agent and note this in the final report.

5. Aggregate

Present the two reports under ## Standards and ## Spec headings, verbatim or lightly cleaned. Do not merge or rerank findings — the two axes are deliberately separate (see Why two axes).

End with a one-line summary: total findings per axis, and the worst issue within each axis (if any). Don't pick a single winner across axes — that's the reranking the separation exists to prevent.

Why two axes

A change can pass one axis and fail the other:

  • Code that follows every standard but implements the wrong thing → Standards pass, Spec fail.
  • Code that does exactly what the issue asked but breaks the project's conventions → Spec pass, Standards fail.

Reporting them separately stops one axis from masking the other.

提供深度模块设计的共享词汇与原则,用于指导接口设计、寻找深化机会及提升代码可测试性。确保术语一致,强调通过小而深的接口隐藏复杂实现,以增强调用者杠杆效应和维护者局部性。
设计或改进模块接口 寻找代码深化机会 决定模块边界位置 需要统一深度模块术语
.agents/skills/codebase-design/SKILL.md
npx skills add Remocn/remocn --skill codebase-design -g -y
SKILL.md
Frontmatter
{
    "name": "codebase-design",
    "description": "Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary."
}

Codebase Design

Design deep modules: a lot of behaviour behind a small interface, placed at a clean seam, testable through that interface. Use this language and these principles wherever code is being designed or restructured. The aim is leverage for callers, locality for maintainers, and testability for everyone.

Glossary

Use these terms exactly — don't substitute "component," "service," "API," or "boundary." Consistent language is the whole point.

Module — anything with an interface and an implementation. Deliberately scale-agnostic: a function, class, package, or tier-spanning slice. Avoid: unit, component, service.

Interface — everything a caller must know to use the module correctly: the type signature, but also invariants, ordering constraints, error modes, required configuration, and performance characteristics. Avoid: API, signature (too narrow — they refer only to the type-level surface).

Implementation — what's inside a module, its body of code. Distinct from Adapter: a thing can be a small adapter with a large implementation (a Postgres repo) or a large adapter with a small implementation (an in-memory fake). Reach for "adapter" when the seam is the topic; "implementation" otherwise.

Depth — leverage at the interface: the amount of behaviour a caller (or test) can exercise per unit of interface they have to learn. A module is deep when a large amount of behaviour sits behind a small interface, shallow when the interface is nearly as complex as the implementation.

Seam (Michael Feathers) — a place where you can alter behaviour without editing in that place; the location at which a module's interface lives. Where to put the seam is its own design decision, distinct from what goes behind it. Avoid: boundary (overloaded with DDD's bounded context).

Adapter — a concrete thing that satisfies an interface at a seam. Describes role (what slot it fills), not substance (what's inside).

Leverage — what callers get from depth: more capability per unit of interface they learn. One implementation pays back across N call sites and M tests.

Locality — what maintainers get from depth: change, bugs, knowledge, and verification concentrate in one place rather than spreading across callers. Fix once, fixed everywhere.

Deep vs shallow

Deep module = small interface + lots of implementation:

┌─────────────────────┐
│   Small Interface   │  ← Few methods, simple params
├─────────────────────┤
│                     │
│  Deep Implementation│  ← Complex logic hidden
│                     │
└─────────────────────┘

Shallow module = large interface + little implementation (avoid):

┌─────────────────────────────────┐
│       Large Interface           │  ← Many methods, complex params
├─────────────────────────────────┤
│  Thin Implementation            │  ← Just passes through
└─────────────────────────────────┘

When designing an interface, ask:

  • Can I reduce the number of methods?
  • Can I simplify the parameters?
  • Can I hide more complexity inside?

Principles

  • Depth is a property of the interface, not the implementation. A deep module can be internally composed of small, mockable, swappable parts — they just aren't part of the interface. A module can have internal seams (private to its implementation, used by its own tests) as well as the external seam at its interface.
  • The deletion test. Imagine deleting the module. If complexity vanishes, it was a pass-through. If complexity reappears across N callers, it was earning its keep.
  • The interface is the test surface. Callers and tests cross the same seam. If you want to test past the interface, the module is probably the wrong shape.
  • One adapter means a hypothetical seam. Two adapters means a real one. Don't introduce a seam unless something actually varies across it.

Designing for testability

Good interfaces make testing natural:

  1. Accept dependencies, don't create them.

    // Testable
    function processOrder(order, paymentGateway) {}
    
    // Hard to test
    function processOrder(order) {
      const gateway = new StripeGateway();
    }
    
  2. Return results, don't produce side effects.

    // Testable
    function calculateDiscount(cart): Discount {}
    
    // Hard to test
    function applyDiscount(cart): void {
      cart.total -= discount;
    }
    
  3. Small surface area. Fewer methods = fewer tests needed. Fewer params = simpler test setup.

Relationships

  • A Module has exactly one Interface (the surface it presents to callers and tests).
  • Depth is a property of a Module, measured against its Interface.
  • A Seam is where a Module's Interface lives.
  • An Adapter sits at a Seam and satisfies the Interface.
  • Depth produces Leverage for callers and Locality for maintainers.

Rejected framings

  • Depth as ratio of implementation-lines to interface-lines (Ousterhout): rewards padding the implementation. We use depth-as-leverage instead.
  • "Interface" as the TypeScript interface keyword or a class's public methods: too narrow — interface here includes every fact a caller must know.
  • "Boundary": overloaded with DDD's bounded context. Say seam or interface.

Going deeper

  • Deepening a cluster given its dependencies — see DEEPENING.md: dependency categories, seam discipline, and replace-don't-layer testing.
  • Exploring alternative interfaces — see DESIGN-IT-TWICE.md: spin up parallel sub-agents to design the interface several radically different ways, then compare on depth, locality, and seam placement.
基于“设计两次”理念,并行生成多个截然不同的接口设计方案。通过对比简洁性、灵活性及实现效率等维度,评估各方案优劣,最终综合提炼出最优接口设计,适用于API设计及模块接口探索场景。
用户希望设计API或模块接口 用户要求探索多种接口选项 用户提到“design it twice”
.agents/skills/design-an-interface/SKILL.md
npx skills add Remocn/remocn --skill design-an-interface -g -y
SKILL.md
Frontmatter
{
    "name": "design-an-interface",
    "description": "Generate multiple radically different interface designs for a module using parallel sub-agents. Use when user wants to design an API, explore interface options, compare module shapes, or mentions \"design it twice\"."
}

Design an Interface

Based on "Design It Twice" from "A Philosophy of Software Design": your first idea is unlikely to be the best. Generate multiple radically different designs, then compare.

Workflow

1. Gather Requirements

Before designing, understand:

  • What problem does this module solve?
  • Who are the callers? (other modules, external users, tests)
  • What are the key operations?
  • Any constraints? (performance, compatibility, existing patterns)
  • What should be hidden inside vs exposed?

Ask: "What does this module need to do? Who will use it?"

2. Generate Designs (Parallel Sub-Agents)

Spawn 3+ sub-agents simultaneously using Task tool. Each must produce a radically different approach.

Prompt template for each sub-agent:

Design an interface for: [module description]

Requirements: [gathered requirements]

Constraints for this design: [assign a different constraint to each agent]
- Agent 1: "Minimize method count - aim for 1-3 methods max"
- Agent 2: "Maximize flexibility - support many use cases"
- Agent 3: "Optimize for the most common case"
- Agent 4: "Take inspiration from [specific paradigm/library]"

Output format:
1. Interface signature (types/methods)
2. Usage example (how caller uses it)
3. What this design hides internally
4. Trade-offs of this approach

3. Present Designs

Show each design with:

  1. Interface signature - types, methods, params
  2. Usage examples - how callers actually use it in practice
  3. What it hides - complexity kept internal

Present designs sequentially so user can absorb each approach before comparison.

4. Compare Designs

After showing all designs, compare them on:

  • Interface simplicity: fewer methods, simpler params
  • General-purpose vs specialized: flexibility vs focus
  • Implementation efficiency: does shape allow efficient internals?
  • Depth: small interface hiding significant complexity (good) vs large interface with thin implementation (bad)
  • Ease of correct use vs ease of misuse

Discuss trade-offs in prose, not tables. Highlight where designs diverge most.

5. Synthesize

Often the best design combines insights from multiple options. Ask:

  • "Which design best fits your primary use case?"
  • "Any elements from other designs worth incorporating?"

Evaluation Criteria

From "A Philosophy of Software Design":

Interface simplicity: Fewer methods, simpler params = easier to learn and use correctly.

General-purpose: Can handle future use cases without changes. But beware over-generalization.

Implementation efficiency: Does interface shape allow efficient implementation? Or force awkward internals?

Depth: Small interface hiding significant complexity = deep module (good). Large interface with thin implementation = shallow module (avoid).

Anti-Patterns

  • Don't let sub-agents produce similar designs - enforce radical difference
  • Don't skip comparison - the value is in contrast
  • Don't implement - this is purely about interface shape
  • Don't evaluate based on implementation effort
用于诊断顽固Bug和性能回归的调试技能。当用户请求调试、报告故障或系统变慢时触发。核心在于构建紧密的反馈循环,通过测试、脚本或复现手段定位问题根源,而非盲目阅读代码。
用户说'diagnose'或'debug this' 报告系统损坏、抛出异常、失败或运行缓慢
.agents/skills/diagnosing-bugs/SKILL.md
npx skills add Remocn/remocn --skill diagnosing-bugs -g -y
SKILL.md
Frontmatter
{
    "name": "diagnosing-bugs",
    "description": "Diagnosis loop for hard bugs and performance regressions. Use when the user says \"diagnose\"\/\"debug this\", or reports something broken\/throwing\/failing\/slow."
}

Diagnosing Bugs

A discipline for hard bugs. Skip phases only when explicitly justified.

When exploring the codebase, read CONTEXT.md (if it exists) to get a clear mental model of the relevant modules, and check ADRs in the area you're touching.

Phase 1 — Build a feedback loop

This is the skill. Everything else is mechanical. If you have a tight pass/fail signal for the bug — one that goes red on this bug — you will find the cause; bisection, hypothesis-testing, and instrumentation all just consume it. If you don't have one, no amount of staring at code will save you.

Spend disproportionate effort here. Be aggressive. Be creative. Refuse to give up.

Ways to construct one — try them in roughly this order

  1. Failing test at whatever seam reaches the bug — unit, integration, e2e.
  2. Curl / HTTP script against a running dev server.
  3. CLI invocation with a fixture input, diffing stdout against a known-good snapshot.
  4. Headless browser script (Playwright / Puppeteer) — drives the UI, asserts on DOM/console/network.
  5. Replay a captured trace. Save a real network request / payload / event log to disk; replay it through the code path in isolation.
  6. Throwaway harness. Spin up a minimal subset of the system (one service, mocked deps) that exercises the bug code path with a single function call.
  7. Property / fuzz loop. If the bug is "sometimes wrong output", run 1000 random inputs and look for the failure mode.
  8. Bisection harness. If the bug appeared between two known states (commit, dataset, version), automate "boot at state X, check, repeat" so you can git bisect run it.
  9. Differential loop. Run the same input through old-version vs new-version (or two configs) and diff outputs.
  10. HITL bash script. Last resort. If a human must click, drive them with scripts/hitl-loop.template.sh so the loop is still structured. Captured output feeds back to you.

Build the right feedback loop, and the bug is 90% fixed.

Tighten the loop

Treat the loop as a product. Once you have a loop, tighten it:

  • Can I make it faster? (Cache setup, skip unrelated init, narrow the test scope.)
  • Can I make the signal sharper? (Assert on the specific symptom, not "didn't crash".)
  • Can I make it more deterministic? (Pin time, seed RNG, isolate filesystem, freeze network.)

A 30-second flaky loop is barely better than no loop; a 2-second deterministic one is tight — a debugging superpower.

Non-deterministic bugs

The goal is not a clean repro but a higher reproduction rate. Loop the trigger 100×, parallelise, add stress, narrow timing windows, inject sleeps. A 50%-flake bug is debuggable; 1% is not — keep raising the rate until it's debuggable.

When you genuinely cannot build a loop

Stop and say so explicitly. List what you tried. Ask the user for: (a) access to whatever environment reproduces it, (b) a captured artifact (HAR file, log dump, core dump, screen recording with timestamps), or (c) permission to add temporary production instrumentation. Do not proceed to hypothesise without a loop.

Completion criterion — a tight loop that goes red

Phase 1 is done when the loop is tight and red-capable: you can name one command — a script path, a test invocation, a curl — that you have already run at least once (paste the invocation and its output), and that is:

  • Red-capable — it drives the actual bug code path and asserts the user's exact symptom, so it can go red on this bug and green once fixed. Not "runs without erroring" — it must be able to catch this specific bug.
  • Deterministic — same verdict every run (flaky bugs: a pinned, high reproduction rate, per above).
  • Fast — seconds, not minutes.
  • Agent-runnable — you can run it unattended; a human in the loop only via scripts/hitl-loop.template.sh.

If you catch yourself reading code to build a theory before this command exists, stop — jumping straight to a hypothesis is the exact failure this skill prevents. No red-capable command, no Phase 2.

Phase 2 — Reproduce + minimise

Run the loop. Watch it go red — the bug appears.

Confirm:

  • The loop produces the failure mode the user described — not a different failure that happens to be nearby. Wrong bug = wrong fix.
  • The failure is reproducible across multiple runs (or, for non-deterministic bugs, reproducible at a high enough rate to debug against).
  • You have captured the exact symptom (error message, wrong output, slow timing) so later phases can verify the fix actually addresses it.

Minimise

Once it's red, shrink the repro to the smallest scenario that still goes red. Cut inputs, callers, config, data, and steps one at a time, re-running the loop after each cut — keep only what's load-bearing for the failure.

Why bother: a minimal repro shrinks the hypothesis space in Phase 3 (fewer moving parts left to suspect) and becomes the clean regression test in Phase 5.

Done when every remaining element is load-bearing — removing any one of them makes the loop go green.

Do not proceed until you have reproduced and minimised.

Phase 3 — Hypothesise

Generate 3–5 ranked hypotheses before testing any of them. Single-hypothesis generation anchors on the first plausible idea.

Each hypothesis must be falsifiable: state the prediction it makes.

Format: "If <X> is the cause, then <changing Y> will make the bug disappear / <changing Z> will make it worse."

If you cannot state the prediction, the hypothesis is a vibe — discard or sharpen it.

Show the ranked list to the user before testing. They often have domain knowledge that re-ranks instantly ("we just deployed a change to #3"), or know hypotheses they've already ruled out. Cheap checkpoint, big time saver. Don't block on it — proceed with your ranking if the user is AFK.

Phase 4 — Instrument

Each probe must map to a specific prediction from Phase 3. Change one variable at a time.

Tool preference:

  1. Debugger / REPL inspection if the env supports it. One breakpoint beats ten logs.
  2. Targeted logs at the boundaries that distinguish hypotheses.
  3. Never "log everything and grep".

Tag every debug log with a unique prefix, e.g. [DEBUG-a4f2]. Cleanup at the end becomes a single grep. Untagged logs survive; tagged logs die.

Perf branch. For performance regressions, logs are usually wrong. Instead: establish a baseline measurement (timing harness, performance.now(), profiler, query plan), then bisect. Measure first, fix second.

Phase 5 — Fix + regression test

Write the regression test before the fix — but only if there is a correct seam for it.

A correct seam is one where the test exercises the real bug pattern as it occurs at the call site. If the only available seam is too shallow (single-caller test when the bug needs multiple callers, unit test that can't replicate the chain that triggered the bug), a regression test there gives false confidence.

If no correct seam exists, that itself is the finding. Note it. The codebase architecture is preventing the bug from being locked down. Flag this for the next phase.

If a correct seam exists:

  1. Turn the minimised repro into a failing test at that seam.
  2. Watch it fail.
  3. Apply the fix.
  4. Watch it pass.
  5. Re-run the Phase 1 feedback loop against the original (un-minimised) scenario.

Phase 6 — Cleanup + post-mortem

Required before declaring done:

  • Original repro no longer reproduces (re-run the Phase 1 loop)
  • Regression test passes (or absence of seam is documented)
  • All [DEBUG-...] instrumentation removed (grep the prefix)
  • Throwaway prototypes deleted (or moved to a clearly-marked debug location)
  • The hypothesis that turned out correct is stated in the commit / PR message — so the next debugger learns

Then ask: what would have prevented this bug? If the answer involves architectural change (no good test seam, tangled callers, hidden coupling) hand off to the /improve-codebase-architecture skill with the specifics. Make the recommendation after the fix is in, not before — you have more information now than when you started.

主动构建和精炼项目领域模型。当用户需明确领域术语、记录架构决策或需维护领域模型时使用。通过挑战现有词汇、澄清模糊概念、结合代码验证及适时更新上下文文档,确保统一语言的一致性。
需要确定领域术语或统一语言 需要记录架构决策 其他技能需要维护领域模型
.agents/skills/domain-modeling/SKILL.md
npx skills add Remocn/remocn --skill domain-modeling -g -y
SKILL.md
Frontmatter
{
    "name": "domain-modeling",
    "description": "Build and sharpen a project's domain model. Use when the user wants to pin down domain terminology or a ubiquitous language, record an architectural decision, or when another skill needs to maintain the domain model."
}

Domain Modeling

Actively build and sharpen the project's domain model as you design. This is the active discipline — challenging terms, inventing edge-case scenarios, and writing the glossary and decisions down the moment they crystallise. (Merely reading CONTEXT.md for vocabulary is not this skill — that's a one-line habit any skill can do. This skill is for when you're changing the model, not just consuming it.)

File structure

Most repos have a single context:

/
├── CONTEXT.md
├── docs/
│   └── adr/
│       ├── 0001-event-sourced-orders.md
│       └── 0002-postgres-for-write-model.md
└── src/

If a CONTEXT-MAP.md exists at the root, the repo has multiple contexts. The map points to where each one lives:

/
├── CONTEXT-MAP.md
├── docs/
│   └── adr/                          ← system-wide decisions
├── src/
│   ├── ordering/
│   │   ├── CONTEXT.md
│   │   └── docs/adr/                 ← context-specific decisions
│   └── billing/
│       ├── CONTEXT.md
│       └── docs/adr/

Create files lazily — only when you have something to write. If no CONTEXT.md exists, create one when the first term is resolved. If no docs/adr/ exists, create it when the first ADR is needed.

During the session

Challenge against the glossary

When the user uses a term that conflicts with the existing language in CONTEXT.md, call it out immediately. "Your glossary defines 'cancellation' as X, but you seem to mean Y — which is it?"

Sharpen fuzzy language

When the user uses vague or overloaded terms, propose a precise canonical term. "You're saying 'account' — do you mean the Customer or the User? Those are different things."

Discuss concrete scenarios

When domain relationships are being discussed, stress-test them with specific scenarios. Invent scenarios that probe edge cases and force the user to be precise about the boundaries between concepts.

Cross-reference with code

When the user states how something works, check whether the code agrees. If you find a contradiction, surface it: "Your code cancels entire Orders, but you just said partial cancellation is possible — which is right?"

Update CONTEXT.md inline

When a term is resolved, update CONTEXT.md right there. Don't batch these up — capture them as they happen. Use the format in CONTEXT-FORMAT.md.

CONTEXT.md should be totally devoid of implementation details. Do not treat CONTEXT.md as a spec, a scratch pad, or a repository for implementation decisions. It is a glossary and nothing else.

Offer ADRs sparingly

Only offer to create an ADR when all three are true:

  1. Hard to reverse — the cost of changing your mind later is meaningful
  2. Surprising without context — a future reader will wonder "why did they do it this way?"
  3. The result of a real trade-off — there were genuine alternatives and you picked one for specific reasons

If any of the three is missing, skip the ADR. Use the format in ADR-FORMAT.md.

用于编辑和优化文章草稿。通过按逻辑依赖关系重组章节、提升清晰度与连贯性来改进内容,确保段落简洁,并在修改前确认章节结构。
用户希望编辑或修订文章 用户需要改善文章的可读性和结构
.agents/skills/edit-article/SKILL.md
npx skills add Remocn/remocn --skill edit-article -g -y
SKILL.md
Frontmatter
{
    "name": "edit-article",
    "description": "Edit and improve articles by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, or improve an article draft.",
    "disable-model-invocation": true
}
  1. First, divide the article into sections based on its headings. Think about the main points you want to make during those sections.

Consider that information is a directed acyclic graph, and that pieces of information can depend on other pieces of information. Make sure that the order of the sections and their contents respects these dependencies.

Confirm the sections with the user.

  1. For each section:

2a. Rewrite the section to improve clarity, coherence, and flow. Use maximum 240 characters per paragraph.

为 Claude Code 配置 PreToolUse 钩子,拦截并阻止 git push、reset --hard 等危险操作。支持项目级或全局安装,需手动复制脚本、修改配置及验证。
用户希望防止破坏性 git 操作 需要添加 git 安全钩子 要求在 Claude Code 中屏蔽 git push 或 reset
.agents/skills/git-guardrails-claude-code/SKILL.md
npx skills add Remocn/remocn --skill git-guardrails-claude-code -g -y
SKILL.md
Frontmatter
{
    "name": "git-guardrails-claude-code",
    "description": "Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute. Use when user wants to prevent destructive git operations, add git safety hooks, or block git push\/reset in Claude Code."
}

Setup Git Guardrails

Sets up a PreToolUse hook that intercepts and blocks dangerous git commands before Claude executes them.

What Gets Blocked

  • git push (all variants including --force)
  • git reset --hard
  • git clean -f / git clean -fd
  • git branch -D
  • git checkout . / git restore .

When blocked, Claude sees a message telling it that it does not have authority to access these commands.

Steps

1. Ask scope

Ask the user: install for this project only (.claude/settings.json) or all projects (~/.claude/settings.json)?

2. Copy the hook script

The bundled script is at: scripts/block-dangerous-git.sh

Copy it to the target location based on scope:

  • Project: .claude/hooks/block-dangerous-git.sh
  • Global: ~/.claude/hooks/block-dangerous-git.sh

Make it executable with chmod +x.

3. Add hook to settings

Add to the appropriate settings file:

Project (.claude/settings.json):

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Bash",
        "hooks": [
          {
            "type": "command",
            "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/block-dangerous-git.sh"
          }
        ]
      }
    ]
  }
}

Global (~/.claude/settings.json):

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Bash",
        "hooks": [
          {
            "type": "command",
            "command": "~/.claude/hooks/block-dangerous-git.sh"
          }
        ]
      }
    ]
  }
}

If the settings file already exists, merge the hook into existing hooks.PreToolUse array — don't overwrite other settings.

4. Ask about customization

Ask if user wants to add or remove any patterns from the blocked list. Edit the copied script accordingly.

5. Verify

Run a quick test:

echo '{"tool_input":{"command":"git push origin main"}}' | <path-to-script>

Should exit with code 2 and print a BLOCKED message to stderr.

用于在构建前严格压力测试计划或设计。通过逐一提问挖掘决策细节,自动查询代码库事实,直至双方达成共识。仅在用户确认后才执行计划,避免信息过载。
用户希望压力测试计划 用户使用 'grill' 相关触发词
.agents/skills/grilling/SKILL.md
npx skills add Remocn/remocn --skill grilling -g -y
SKILL.md
Frontmatter
{
    "name": "grilling",
    "description": "Grill the user relentlessly about a plan or design. Use when the user wants to stress-test a plan before building, or uses any 'grill' trigger phrases."
}

Interview me relentlessly about every aspect of this plan until we reach a shared understanding. Walk down each branch of the design tree, resolving dependencies between decisions one-by-one. For each question, provide your recommended answer.

Ask the questions one at a time, waiting for feedback on each question before continuing. Asking multiple questions at once is bewildering.

If a fact can be found by exploring the codebase, look it up rather than asking me. The decisions, though, are mine — put each one to me and wait for my answer.

Do not enact the plan until I confirm we have reached a shared understanding.

将当前对话压缩为交接文档,保存至系统临时目录供其他智能体接续工作。包含建议技能列表,避免重复已有工件内容,并自动脱敏敏感信息。
需要中断当前任务并移交上下文给新智能体时 用户显式请求生成会话总结或交接记录时
.agents/skills/handoff/SKILL.md
npx skills add Remocn/remocn --skill handoff -g -y
SKILL.md
Frontmatter
{
    "name": "handoff",
    "description": "Compact the current conversation into a handoff document for another agent to pick up.",
    "argument-hint": "What will the next session be used for?",
    "disable-model-invocation": true
}

Write a handoff document summarising the current conversation so a fresh agent can continue the work. Save to the temporary directory of the user's OS - not the current workspace.

Include a "suggested skills" section in the document, which suggests skills that the agent should invoke.

Do not duplicate content already captured in other artifacts (specs, plans, ADRs, issues, commits, diffs). Reference them by path or URL instead.

Redact any sensitive information, such as API keys, passwords, or personally identifiable information.

If the user passed arguments, treat them as a description of what the next session will focus on and tailor the doc accordingly.

根据需求规格或工单实现功能,优先使用TDD,定期运行类型检查和测试,完成后进行代码审查并提交到当前分支。
用户要求根据规范实现功能 用户要求根据工单完成开发任务
.agents/skills/implement/SKILL.md
npx skills add Remocn/remocn --skill implement -g -y
SKILL.md
Frontmatter
{
    "name": "implement",
    "description": "Implement a piece of work based on a spec or set of tickets.",
    "disable-model-invocation": true
}

Implement the work described by the user in the spec or tickets.

Use /tdd where possible, at pre-agreed seams.

Run typechecking regularly, single test files regularly, and the full test suite once at the end.

Once done, use /code-review to review the work.

Commit your work to the current branch.

扫描代码库以发现架构深化机会,生成包含可视化图表的HTML报告。基于领域模型和设计词汇(如模块、深度、接缝)识别浅层模块,提出重构建议以提升可测试性和AI导航能力,并通过删除测试验证方案有效性。
需要评估或改进代码库整体架构设计 寻找将浅层模块转化为深层模块的重构机会 希望提升代码的可测试性、局部性和AI可读性
.agents/skills/improve-codebase-architecture/SKILL.md
npx skills add Remocn/remocn --skill improve-codebase-architecture -g -y
SKILL.md
Frontmatter
{
    "name": "improve-codebase-architecture",
    "description": "Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.",
    "disable-model-invocation": true
}

Improve Codebase Architecture

Surface architectural friction and propose deepening opportunities — refactors that turn shallow modules into deep ones. The aim is testability and AI-navigability.

This command is informed by the project's domain model and built on a shared design vocabulary:

  • Run the /codebase-design skill for the architecture vocabulary (module, interface, depth, seam, adapter, leverage, locality) and its principles (the deletion test, "the interface is the test surface", "one adapter = hypothetical seam, two = real"). Use these terms exactly in every suggestion — don't drift into "component," "service," "API," or "boundary."
  • The domain language in CONTEXT.md gives names to good seams; ADRs in docs/adr/ record decisions this command should not re-litigate.

Process

1. Explore

Read the project's domain glossary (CONTEXT.md) and any ADRs in the area you're touching first.

Then use the Agent tool with subagent_type=Explore to walk the codebase. Don't follow rigid heuristics — explore organically and note where you experience friction:

  • Where does understanding one concept require bouncing between many small modules?
  • Where are modules shallow — interface nearly as complex as the implementation?
  • Where have pure functions been extracted just for testability, but the real bugs hide in how they're called (no locality)?
  • Where do tightly-coupled modules leak across their seams?
  • Which parts of the codebase are untested, or hard to test through their current interface?

Apply the deletion test to anything you suspect is shallow: would deleting it concentrate complexity, or just move it? A "yes, concentrates" is the signal you want.

2. Present candidates as an HTML report

Write a self-contained HTML file to the OS temp directory so nothing lands in the repo. Resolve the temp dir from $TMPDIR, falling back to /tmp (or %TEMP% on Windows), and write to <tmpdir>/architecture-review-<timestamp>.html so each run gets a fresh file. Open it for the user — xdg-open <path> on Linux, open <path> on macOS, start <path> on Windows — and tell them the absolute path.

The report uses Tailwind via CDN for layout and styling, and Mermaid via CDN for diagrams where a graph/flow/sequence reliably communicates the structure. Mix Mermaid with hand-crafted CSS/SVG visuals — use Mermaid when relationships are graph-shaped (call graphs, dependencies, sequences), and hand-built divs/SVG when you want something more editorial (mass diagrams, cross-sections, collapse animations). Each candidate gets a before/after visualisation. Be visual.

For each candidate, render a card with:

  • Files — which files/modules are involved
  • Problem — why the current architecture is causing friction
  • Solution — plain English description of what would change
  • Benefits — explained in terms of locality and leverage, and how tests would improve
  • Before / After diagram — side-by-side, custom-drawn, illustrating the shallowness and the deepening
  • Recommendation strength — one of Strong, Worth exploring, Speculative, rendered as a badge

End the report with a Top recommendation section: which candidate you'd tackle first and why.

Use CONTEXT.md vocabulary for the domain, and the /codebase-design vocabulary for the architecture. If CONTEXT.md defines "Order," talk about "the Order intake module" — not "the FooBarHandler," and not "the Order service."

ADR conflicts: if a candidate contradicts an existing ADR, only surface it when the friction is real enough to warrant revisiting the ADR. Mark it clearly in the card (e.g. a warning callout: "contradicts ADR-0007 — but worth reopening because…"). Don't list every theoretical refactor an ADR forbids.

See HTML-REPORT.md for the full HTML scaffold, diagram patterns, and styling guidance.

Do NOT propose interfaces yet. After the file is written, ask the user: "Which of these would you like to explore?"

3. Grilling loop

Once the user picks a candidate, run the /grilling skill to walk the design tree with them — constraints, dependencies, the shape of the deepened module, what sits behind the seam, what tests survive.

Side effects happen inline as decisions crystallize — run the /domain-modeling skill to keep the domain model current as you go:

  • Naming a deepened module after a concept not in CONTEXT.md? Add the term to CONTEXT.md. Create the file lazily if it doesn't exist.
  • Sharpening a fuzzy term during the conversation? Update CONTEXT.md right there.
  • User rejects the candidate with a load-bearing reason? Offer an ADR, framed as: "Want me to record this as an ADR so future architecture reviews don't re-suggest it?" Only offer when the reason would actually be needed by a future explorer to avoid re-suggesting the same thing — skip ephemeral reasons ("not worth it right now") and self-evident ones.
  • Want to explore alternative interfaces for the deepened module? Run the /codebase-design skill and use its design-it-twice parallel sub-agent pattern.
通过一对一追问引导用户梳理生活与工作循环,生成可执行的自动化工作流规范。利用空间笔记辅助定义术语,确保最终交付的规格文档详尽无歧义,便于直接实现。
需要构建自动化工作流 希望梳理重复性任务模式 准备将日常循环委托给AI
.agents/skills/loop-me/SKILL.md
npx skills add Remocn/remocn --skill loop-me -g -y
SKILL.md
Frontmatter
{
    "name": "loop-me",
    "description": "Grill me about specs for the workflows I want to build, within this workspace.",
    "argument-hint": "A workflow to design, or nothing to go find one",
    "disable-model-invocation": true
}

Run a stateful /grilling session whose only output is workflow specs. Use the grilling discipline — relentless, one question at a time, a recommended answer attached to each — aimed at the vocabulary and goal below. Create, edit, and delete specs as the grilling resolves things.

The loop lens

A loop is a recurring pattern in the user's life: their career, their week, their morning, a single repeated activity. Picturing a life as loops within loops reveals how predictable its activities really are — which is what makes them worth delegating. Use the lens to find loops worth specifying, and propose ones the user hasn't noticed.

A workflow is the spec of one loop, made real. You run a workflow on a loop — the loop is its running instantiation. Workflows live in workflows/*.md and are the source of truth.

Vocabulary

A shared language, reached for only when a workflow calls for it — never a checklist. Mandate nothing structural: a workflow needs no AI, no checkpoint, and no schedule unless the grilling shows it does.

  • Trigger — what fires each run: an event (a new email, a new issue) or a schedule (every morning). Event-triggering is usually the more efficient.
  • Checkpoint — a human-in-the-loop point where the user is asked to verify or decide. Some workflows have none and run autonomously; some use no AI at all.
  • Push right — defer the checkpoint as far as it will go. Do maximal work before involving the human, so they are asked once, late, with everything prepared.
  • Brief — what a checkpoint presents: a tight, decision-ready summary — what was produced, why, and a link down to the asset itself — never the raw output. The user reads a brief, not a draft. Speed of review is imperative.

Definition of done

A workflow spec is done when an implementer agent could build it without asking a single question. Grill until then; nothing is done while a question remains.

The workspace

  • workflows/*.md — one spec per workflow.
  • NOTES.md — raw notes on the user's world: the tools they use, the channels they process, and their own terminology for both. When it is empty or thin, interview them about their world before specifying anything. Sharpen fuzzy terms into canonical ones as they surface, and record them here.
将测试代码中的 TypeScript `as` 类型断言迁移至 @total-typescript/shoehorn。提供 fromPartial、fromAny 等函数替代方案,解决大型对象部分属性赋值及故意错误数据测试问题,确保类型安全并简化测试编写。
用户提及 shoehorn 希望替换测试中的 as 断言 需要处理部分测试数据
.agents/skills/migrate-to-shoehorn/SKILL.md
npx skills add Remocn/remocn --skill migrate-to-shoehorn -g -y
SKILL.md
Frontmatter
{
    "name": "migrate-to-shoehorn",
    "description": "Migrate test files from `as` type assertions to @total-typescript\/shoehorn. Use when user mentions shoehorn, wants to replace `as` in tests, or needs partial test data."
}

Migrate to Shoehorn

Why shoehorn?

shoehorn lets you pass partial data in tests while keeping TypeScript happy. It replaces as assertions with type-safe alternatives.

Test code only. Never use shoehorn in production code.

Problems with as in tests:

  • Trained not to use it
  • Must manually specify target type
  • Double-as (as unknown as Type) for intentionally wrong data

Install

npm i @total-typescript/shoehorn

Migration patterns

Large objects with few needed properties

Before:

type Request = {
  body: { id: string };
  headers: Record<string, string>;
  cookies: Record<string, string>;
  // ...20 more properties
};

it("gets user by id", () => {
  // Only care about body.id but must fake entire Request
  getUser({
    body: { id: "123" },
    headers: {},
    cookies: {},
    // ...fake all 20 properties
  });
});

After:

import { fromPartial } from "@total-typescript/shoehorn";

it("gets user by id", () => {
  getUser(
    fromPartial({
      body: { id: "123" },
    }),
  );
});

as TypefromPartial()

Before:

getUser({ body: { id: "123" } } as Request);

After:

import { fromPartial } from "@total-typescript/shoehorn";

getUser(fromPartial({ body: { id: "123" } }));

as unknown as TypefromAny()

Before:

getUser({ body: { id: 123 } } as unknown as Request); // wrong type on purpose

After:

import { fromAny } from "@total-typescript/shoehorn";

getUser(fromAny({ body: { id: 123 } }));

When to use each

Function Use case
fromPartial() Pass partial data that still type-checks
fromAny() Pass intentionally wrong data (keeps autocomplete)
fromExact() Force full object (swap with fromPartial later)

Workflow

  1. Gather requirements - ask user:

    • What test files have as assertions causing problems?
    • Are they dealing with large objects where only some properties matter?
    • Do they need to pass intentionally wrong data for error testing?
  2. Install and migrate:

    • Install: npm i @total-typescript/shoehorn
    • Find test files with as assertions: grep -r " as [A-Z]" --include="*.test.ts" --include="*.spec.ts"
    • Replace as Type with fromPartial()
    • Replace as unknown as Type with fromAny()
    • Add imports from @total-typescript/shoehorn
    • Run type check to verify
用于在 Obsidian 知识库中搜索、创建和管理笔记。支持按文件名或内容查找,创建符合命名规范的笔记并添加 wikilinks,以及通过反向链接和索引笔记发现相关内容。
用户需要在 Obsidian 中搜索特定笔记 用户想要创建新的知识笔记 用户希望整理或组织现有的笔记结构
.agents/skills/obsidian-vault/SKILL.md
npx skills add Remocn/remocn --skill obsidian-vault -g -y
SKILL.md
Frontmatter
{
    "name": "obsidian-vault",
    "description": "Search, create, and manage notes in the Obsidian vault with wikilinks and index notes. Use when user wants to find, create, or organize notes in Obsidian."
}

Obsidian Vault

Vault location

/mnt/d/Obsidian Vault/AI Research/

Mostly flat at root level.

Naming conventions

  • Index notes: aggregate related topics (e.g., Ralph Wiggum Index.md, Skills Index.md, RAG Index.md)
  • Title case for all note names
  • No folders for organization - use links and index notes instead

Linking

  • Use Obsidian [[wikilinks]] syntax: [[Note Title]]
  • Notes link to dependencies/related notes at the bottom
  • Index notes are just lists of [[wikilinks]]

Workflows

Search for notes

# Search by filename
find "/mnt/d/Obsidian Vault/AI Research/" -name "*.md" | grep -i "keyword"

# Search by content
grep -rl "keyword" "/mnt/d/Obsidian Vault/AI Research/" --include="*.md"

Or use Grep/Glob tools directly on the vault path.

Create a new note

  1. Use Title Case for filename
  2. Write content as a unit of learning (per vault rules)
  3. Add [[wikilinks]] to related notes at the bottom
  4. If part of a numbered sequence, use the hierarchical numbering scheme

Find related notes

Search for [[Note Title]] across the vault to find backlinks:

grep -rl "\\[\\[Note Title\\]\\]" "/mnt/d/Obsidian Vault/AI Research/"

Find index notes

find "/mnt/d/Obsidian Vault/AI Research/" -name "*Index*"
用于构建一次性原型以验证设计问题。根据需求分为逻辑(状态机)和UI(界面变体)两个分支。遵循快速、无持久化、易运行原则,旨在快速探索答案并随后删除或整合代码。
用户希望验证状态模型或逻辑是否合理 用户希望探索UI界面的外观和布局
.agents/skills/prototype/SKILL.md
npx skills add Remocn/remocn --skill prototype -g -y
SKILL.md
Frontmatter
{
    "name": "prototype",
    "description": "Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like."
}

Prototype

A prototype is throwaway code that answers a question. The question decides the shape.

Pick a branch

Identify which question is being answered — from the user's prompt, the surrounding code, or by asking if the user is around:

  • "Does this logic / state model feel right?"LOGIC.md. Build a tiny interactive terminal app that pushes the state machine through cases that are hard to reason about on paper.
  • "What should this look like?"UI.md. Generate several radically different UI variations on a single route, switchable via a URL search param and a floating bottom bar.

The two branches produce very different artifacts — getting this wrong wastes the whole prototype. If the question is genuinely ambiguous and the user isn't reachable, default to whichever branch better matches the surrounding code (a backend module → logic; a page or component → UI) and state the assumption at the top of the prototype.

Rules that apply to both

  1. Throwaway from day one, and clearly marked as such. Locate the prototype code close to where it will actually be used (next to the module or page it's prototyping for) so context is obvious — but name it so a casual reader can see it's a prototype, not production. For throwaway UI routes, obey whatever routing convention the project already uses; don't invent a new top-level structure.
  2. One command to run. Whatever the project's existing task runner supports — pnpm <name>, python <path>, bun <path>, etc. The user must be able to start it without thinking.
  3. No persistence by default. State lives in memory. Persistence is the thing the prototype is checking, not something it should depend on. If the question explicitly involves a database, hit a scratch DB or a local file with a clear "PROTOTYPE — wipe me" name.
  4. Skip the polish. No tests, no error handling beyond what makes the prototype runnable, no abstractions. The point is to learn something fast and then delete it.
  5. Surface the state. After every action (logic) or on every variant switch (UI), print or render the full relevant state so the user can see what changed.
  6. Delete or absorb when done. When the prototype has answered its question, either delete it or fold the validated decision into the real code — don't leave it rotting in the repo.

When done

The answer is the only thing worth keeping from a prototype. Capture it somewhere durable (commit message, ADR, issue, or a NOTES.md next to the prototype) along with the question it was answering. If the user is around, that capture is a quick conversation; if not, leave the placeholder so they (or you, on the next pass) can fill in the verdict before deleting the prototype.

Interactive QA session where user reports bugs or issues conversationally, and the agent files GitHub issues. Explores the codebase in the background for context and domain language. Use when user wants to report bugs, do QA, file issues conversationally, or mentions "QA session".
.agents/skills/qa/SKILL.md
npx skills add Remocn/remocn --skill qa -g -y
SKILL.md
Frontmatter
{
    "name": "qa",
    "description": "Interactive QA session where user reports bugs or issues conversationally, and the agent files GitHub issues. Explores the codebase in the background for context and domain language. Use when user wants to report bugs, do QA, file issues conversationally, or mentions \"QA session\"."
}

QA Session

Run an interactive QA session. The user describes problems they're encountering. You clarify, explore the codebase for context, and file GitHub issues that are durable, user-focused, and use the project's domain language.

For each issue the user raises

1. Listen and lightly clarify

Let the user describe the problem in their own words. Ask at most 2-3 short clarifying questions focused on:

  • What they expected vs what actually happened
  • Steps to reproduce (if not obvious)
  • Whether it's consistent or intermittent

Do NOT over-interview. If the description is clear enough to file, move on.

2. Explore the codebase in the background

While talking to the user, kick off an Agent (subagent_type=Explore) in the background to understand the relevant area. The goal is NOT to find a fix — it's to:

  • Learn the domain language used in that area (check UBIQUITOUS_LANGUAGE.md)
  • Understand what the feature is supposed to do
  • Identify the user-facing behavior boundary

This context helps you write a better issue — but the issue itself should NOT reference specific files, line numbers, or internal implementation details.

3. Assess scope: single issue or breakdown?

Before filing, decide whether this is a single issue or needs to be broken down into multiple issues.

Break down when:

  • The fix spans multiple independent areas (e.g. "the form validation is wrong AND the success message is missing AND the redirect is broken")
  • There are clearly separable concerns that different people could work on in parallel
  • The user describes something that has multiple distinct failure modes or symptoms

Keep as a single issue when:

  • It's one behavior that's wrong in one place
  • The symptoms are all caused by the same root behavior

4. File the GitHub issue(s)

Create issues with gh issue create. Do NOT ask the user to review first — just file and share URLs.

Issues must be durable — they should still make sense after major refactors. Write from the user's perspective.

For a single issue

Use this template:

## What happened

[Describe the actual behavior the user experienced, in plain language]

## What I expected

[Describe the expected behavior]

## Steps to reproduce

1. [Concrete, numbered steps a developer can follow]
2. [Use domain terms from the codebase, not internal module names]
3. [Include relevant inputs, flags, or configuration]

## Additional context

[Any extra observations from the user or from codebase exploration that help frame the issue — e.g. "this only happens when using the Docker layer, not the filesystem layer" — use domain language but don't cite files]

For a breakdown (multiple issues)

Create issues in dependency order (blockers first) so you can reference real issue numbers.

Use this template for each sub-issue:

## Parent issue

#<parent-issue-number> (if you created a tracking issue) or "Reported during QA session"

## What's wrong

[Describe this specific behavior problem — just this slice, not the whole report]

## What I expected

[Expected behavior for this specific slice]

## Steps to reproduce

1. [Steps specific to THIS issue]

## Blocked by

- #<issue-number> (if this issue can't be fixed until another is resolved)

Or "None — can start immediately" if no blockers.

## Additional context

[Any extra observations relevant to this slice]

When creating a breakdown:

  • Prefer many thin issues over few thick ones — each should be independently fixable and verifiable
  • Mark blocking relationships honestly — if issue B genuinely can't be tested until issue A is fixed, say so. If they're independent, mark both as "None — can start immediately"
  • Create issues in dependency order so you can reference real issue numbers in "Blocked by"
  • Maximize parallelism — the goal is that multiple people (or agents) can grab different issues simultaneously

Rules for all issue bodies

  • No file paths or line numbers — these go stale
  • Use the project's domain language (check UBIQUITOUS_LANGUAGE.md if it exists)
  • Describe behaviors, not code — "the sync service fails to apply the patch" not "applyPatch() throws on line 42"
  • Reproduction steps are mandatory — if you can't determine them, ask the user
  • Keep it concise — a developer should be able to read the issue in 30 seconds

After filing, print all issue URLs (with blocking relationships summarized) and ask: "Next issue, or are we done?"

5. Continue the session

Keep going until the user says they're done. Each issue is independent — don't batch them.

通过用户访谈深入理解重构需求,探索代码库现状并评估测试覆盖,制定包含极小粒度提交的重构计划,最终生成结构化 GitHub Issue。适用于需要安全、增量式执行大型代码重构的场景。
用户希望规划代码重构 用户需要创建重构 RFC 用户想将重构拆解为安全的增量步骤
.agents/skills/request-refactor-plan/SKILL.md
npx skills add Remocn/remocn --skill request-refactor-plan -g -y
SKILL.md
Frontmatter
{
    "name": "request-refactor-plan",
    "description": "Create a detailed refactor plan with tiny commits via user interview, then file it as a GitHub issue. Use when user wants to plan a refactor, create a refactoring RFC, or break a refactor into safe incremental steps."
}

This skill will be invoked when the user wants to create a refactor request. You should go through the steps below. You may skip steps if you don't consider them necessary.

  1. Ask the user for a long, detailed description of the problem they want to solve and any potential ideas for solutions.

  2. Explore the repo to verify their assertions and understand the current state of the codebase.

  3. Ask whether they have considered other options, and present other options to them.

  4. Interview the user about the implementation. Be extremely detailed and thorough.

  5. Hammer out the exact scope of the implementation. Work out what you plan to change and what you plan not to change.

  6. Look in the codebase to check for test coverage of this area of the codebase. If there is insufficient test coverage, ask the user what their plans for testing are.

  7. Break the implementation into a plan of tiny commits. Remember Martin Fowler's advice to "make each refactoring step as small as possible, so that you can always see the program working."

  8. Create a GitHub issue with the refactor plan. Use the following template for the issue description:

Problem Statement

The problem that the developer is facing, from the developer's perspective.

Solution

The solution to the problem, from the developer's perspective.

Commits

A LONG, detailed implementation plan. Write the plan in plain English, breaking down the implementation into the tiniest commits possible. Each commit should leave the codebase in a working state.

Decision Document

A list of implementation decisions that were made. This can include:

  • The modules that will be built/modified
  • The interfaces of those modules that will be modified
  • Technical clarifications from the developer
  • Architectural decisions
  • Schema changes
  • API contracts
  • Specific interactions

Do NOT include specific file paths or code snippets. They may end up being outdated very quickly.

Testing Decisions

A list of testing decisions that were made. Include:

  • A description of what makes a good test (only test external behavior, not implementation details)
  • Which modules will be tested
  • Prior art for the tests (i.e. similar types of tests in the codebase)

Out of Scope

A description of the things that are out of scope for this refactor.

Further Notes (optional)

Any further notes about the refactor.

启动后台代理,针对问题调查高可信度一手来源(如官方文档、源码),将调查结果整理为带引用的Markdown文件并保存至仓库规范位置。
用户希望深入调研某个主题 需要收集文档或API事实 委托后台代理进行资料查阅工作
.agents/skills/research/SKILL.md
npx skills add Remocn/remocn --skill research -g -y
SKILL.md
Frontmatter
{
    "name": "research",
    "description": "Investigate a question against high-trust primary sources and capture the findings as a Markdown file in the repo. Use when the user wants a topic researched, docs or API facts gathered, or reading legwork delegated to a background agent."
}

Spin up a background agent to do the research, so you keep working while it reads.

Its job:

  1. Investigate the question against primary sources — official docs, source code, specs, first-party APIs — not a secondary write-up of them. Follow every claim back to the source that owns it.
  2. Write the findings to a single Markdown file, citing each claim's source.
  3. Save it where the repo already keeps such notes; match the existing convention, and if there is none, put it somewhere sensible and say where.
用于解决 Git 合并或变基过程中的冲突。通过查看当前状态、分析冲突来源意图、保留双方逻辑或按目标取舍来逐块解决冲突,随后运行自动化检查修复问题,最后完成提交或继续变基流程。
Git 合并冲突 Git 变基冲突
.agents/skills/resolving-merge-conflicts/SKILL.md
npx skills add Remocn/remocn --skill resolving-merge-conflicts -g -y
SKILL.md
Frontmatter
{
    "name": "resolving-merge-conflicts",
    "description": "Use when you need to resolve an in-progress git merge\/rebase conflict."
}
  1. See the current state of the merge/rebase. Check git history, and the conflicting files.

  2. Find the primary sources for each conflict. Understand deeply why each change was made, and what the original intent was. Read the commit messages, check the PRs, check original issues/tickets.

  3. Resolve each hunk. Preserve both intents where possible. Where incompatible, pick the one matching the merge's stated goal and note the trade-off. Do not invent new behaviour. Always resolve; never --abort.

  4. Discover the project's automated checks and run them — typically typecheck, then tests, then format. Fix anything the merge broke.

  5. Finish the merge/rebase. Stage everything and commit. If rebasing, continue the rebase process until all commits are rebased.

用于创建符合规范的练习目录结构,包含章节、题目、解答和说明文件。支持生成存根、运行 lint 检查及修复错误,确保通过 ai-hero-cli 验证并正确提交。
用户要求创建练习目录结构 用户希望生成练习存根 用户需要设置新课程章节
.agents/skills/scaffold-exercises/SKILL.md
npx skills add Remocn/remocn --skill scaffold-exercises -g -y
SKILL.md
Frontmatter
{
    "name": "scaffold-exercises",
    "description": "Create exercise directory structures with sections, problems, solutions, and explainers that pass linting. Use when user wants to scaffold exercises, create exercise stubs, or set up a new course section."
}

Scaffold Exercises

Create exercise directory structures that pass pnpm ai-hero-cli internal lint, then commit with git commit.

Directory naming

  • Sections: XX-section-name/ inside exercises/ (e.g., 01-retrieval-skill-building)
  • Exercises: XX.YY-exercise-name/ inside a section (e.g., 01.03-retrieval-with-bm25)
  • Section number = XX, exercise number = XX.YY
  • Names are dash-case (lowercase, hyphens)

Exercise variants

Each exercise needs at least one of these subfolders:

  • problem/ - student workspace with TODOs
  • solution/ - reference implementation
  • explainer/ - conceptual material, no TODOs

When stubbing, default to explainer/ unless the plan specifies otherwise.

Required files

Each subfolder (problem/, solution/, explainer/) needs a readme.md that:

  • Is not empty (must have real content, even a single title line works)
  • Has no broken links

When stubbing, create a minimal readme with a title and a description:

# Exercise Title

Description here

If the subfolder has code, it also needs a main.ts (>1 line). But for stubs, a readme-only exercise is fine.

Workflow

  1. Parse the plan - extract section names, exercise names, and variant types
  2. Create directories - mkdir -p for each path
  3. Create stub readmes - one readme.md per variant folder with a title
  4. Run lint - pnpm ai-hero-cli internal lint to validate
  5. Fix any errors - iterate until lint passes

Lint rules summary

The linter (pnpm ai-hero-cli internal lint) checks:

  • Each exercise has subfolders (problem/, solution/, explainer/)
  • At least one of problem/, explainer/, or explainer.1/ exists
  • readme.md exists and is non-empty in the primary subfolder
  • No .gitkeep files
  • No speaker-notes.md files
  • No broken links in readmes
  • No pnpm run exercise commands in readmes
  • main.ts required per subfolder unless it's readme-only

Moving/renaming exercises

When renumbering or moving exercises:

  1. Use git mv (not mv) to rename directories - preserves git history
  2. Update the numeric prefix to maintain order
  3. Re-run lint after moves

Example:

git mv exercises/01-retrieval/01.03-embeddings exercises/01-retrieval/01.04-embeddings

Example: stubbing from a plan

Given a plan like:

Section 05: Memory Skill Building
- 05.01 Introduction to Memory
- 05.02 Short-term Memory (explainer + problem + solution)
- 05.03 Long-term Memory

Create:

mkdir -p exercises/05-memory-skill-building/05.01-introduction-to-memory/explainer
mkdir -p exercises/05-memory-skill-building/05.02-short-term-memory/{explainer,problem,solution}
mkdir -p exercises/05-memory-skill-building/05.03-long-term-memory/explainer

Then create readme stubs:

exercises/05-memory-skill-building/05.01-introduction-to-memory/explainer/readme.md -> "# Introduction to Memory"
exercises/05-memory-skill-building/05.02-short-term-memory/explainer/readme.md -> "# Short-term Memory"
exercises/05-memory-skill-building/05.02-short-term-memory/problem/readme.md -> "# Short-term Memory"
exercises/05-memory-skill-building/05.02-short-term-memory/solution/readme.md -> "# Short-term Memory"
exercises/05-memory-skill-building/05.03-long-term-memory/explainer/readme.md -> "# Long-term Memory"
配置工程技能所需的仓库设置,包括问题追踪器、分类标签词汇和领域文档布局。通过探索仓库现状并与用户交互确认选项,为后续工程技能的使用奠定基础。
首次使用工程技能前需要初始化仓库配置 需要设置或修改问题追踪器、分类标签或文档结构
.agents/skills/setup-matt-pocock-skills/SKILL.md
npx skills add Remocn/remocn --skill setup-matt-pocock-skills -g -y
SKILL.md
Frontmatter
{
    "name": "setup-matt-pocock-skills",
    "description": "Configure this repo for the engineering skills — set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.",
    "disable-model-invocation": true
}

Setup Matt Pocock's Skills

Scaffold the per-repo configuration that the engineering skills assume:

  • Issue tracker — where issues live (GitHub by default; local markdown is also supported out of the box)
  • Triage labels — the strings used for the five canonical triage roles
  • Domain docs — where CONTEXT.md and ADRs live, and the consumer rules for reading them

This is a prompt-driven skill, not a deterministic script. Explore, present what you found, confirm with the user, then write.

Process

1. Explore

Look at the current repo to understand its starting state. Read whatever exists; don't assume:

  • git remote -v and .git/config — is this a GitHub repo? Which one?
  • AGENTS.md and CLAUDE.md at the repo root — does either exist? Is there already an ## Agent skills section in either?
  • CONTEXT.md and CONTEXT-MAP.md at the repo root
  • docs/adr/ and any src/*/docs/adr/ directories
  • docs/agents/ — does this skill's prior output already exist?
  • .scratch/ — sign that a local-markdown issue tracker convention is already in use

2. Present findings and ask

Summarise what's present and what's missing. Then walk the user through the three decisions one at a time — present a section, get the user's answer, then move to the next. Don't dump all three at once.

Assume the user does not know what these terms mean. Each section starts with a short explainer (what it is, why these skills need it, what changes if they pick differently). Then show the choices and the default.

Section A — Issue tracker.

Explainer: The "issue tracker" is where issues live for this repo. Skills like to-tickets, triage, to-spec, and qa read from and write to it — they need to know whether to call gh issue create, write a markdown file under .scratch/, or follow some other workflow you describe. Pick the place you actually track work for this repo.

Default posture: these skills were designed for GitHub. If a git remote points at GitHub, propose that. If a git remote points at GitLab (gitlab.com or a self-hosted host), propose GitLab. Otherwise (or if the user prefers), offer:

  • GitHub — issues live in the repo's GitHub Issues (uses the gh CLI)
  • GitLab — issues live in the repo's GitLab Issues (uses the glab CLI)
  • Local markdown — issues live as files under .scratch/<feature>/ in this repo (good for solo projects or repos without a remote)
  • Other (Jira, Linear, etc.) — ask the user to describe the workflow in one paragraph; the skill will record it as freeform prose

If — and only if — the user picked GitHub or GitLab, ask one follow-up:

Explainer: Open-source repos often receive feature requests as pull requests, not just issues — a PR is an issue with attached code. If you turn this on, /triage pulls external PRs into the same queue and runs them through the same labels and states as issues (collaborators' in-flight PRs are left alone). Leave it off if PRs aren't a request surface for you.

  • PRs as a request surface — yes / no (default: no). Record the answer in docs/agents/issue-tracker.md. For local-markdown and other trackers, skip this question — there are no PRs.

Section B — Triage label vocabulary.

Explainer: When the triage skill processes an incoming issue, it moves it through a state machine — needs evaluation, waiting on reporter, ready for an AFK agent to pick up, ready for a human, or won't fix. To do that, it needs to apply labels (or the equivalent in your issue tracker) that match strings you've actually configured. If your repo already uses different label names (e.g. bug:triage instead of needs-triage), map them here so the skill applies the right ones instead of creating duplicates.

The five canonical roles:

  • needs-triage — maintainer needs to evaluate
  • needs-info — waiting on reporter
  • ready-for-agent — fully specified, AFK-ready (an agent can pick it up with no human context)
  • ready-for-human — needs human implementation
  • wontfix — will not be actioned

Default: each role's string equals its name. Ask the user if they want to override any. If their issue tracker has no existing labels, the defaults are fine.

Section C — Domain docs.

Explainer: Some skills (improve-codebase-architecture, diagnosing-bugs, tdd) read a CONTEXT.md file to learn the project's domain language, and docs/adr/ for past architectural decisions. They need to know whether the repo has one global context or multiple (e.g. a monorepo with separate frontend/backend contexts) so they look in the right place.

Confirm the layout:

  • Single-context — one CONTEXT.md + docs/adr/ at the repo root. Most repos are this.
  • Multi-contextCONTEXT-MAP.md at the root pointing to per-context CONTEXT.md files (typically a monorepo).

3. Confirm and edit

Show the user a draft of:

  • The ## Agent skills block to add to whichever of CLAUDE.md / AGENTS.md is being edited (see step 4 for selection rules)
  • The contents of docs/agents/issue-tracker.md, docs/agents/triage-labels.md, docs/agents/domain.md

Let them edit before writing.

4. Write

Pick the file to edit:

  • If CLAUDE.md exists, edit it.
  • Else if AGENTS.md exists, edit it.
  • If neither exists, ask the user which one to create — don't pick for them.

Never create AGENTS.md when CLAUDE.md already exists (or vice versa) — always edit the one that's already there.

If an ## Agent skills block already exists in the chosen file, update its contents in-place rather than appending a duplicate. Don't overwrite user edits to the surrounding sections.

The block:

## Agent skills

### Issue tracker

[one-line summary of where issues are tracked, plus whether external PRs are a triage surface]. See `docs/agents/issue-tracker.md`.

### Triage labels

[one-line summary of the label vocabulary]. See `docs/agents/triage-labels.md`.

### Domain docs

[one-line summary of layout — "single-context" or "multi-context"]. See `docs/agents/domain.md`.

Then write the three docs files using the seed templates in this skill folder as a starting point:

For "other" issue trackers, write docs/agents/issue-tracker.md from scratch using the user's description.

5. Done

Tell the user the setup is complete and which engineering skills will now read from these files. Mention they can edit docs/agents/*.md directly later — re-running this skill is only necessary if they want to switch issue trackers or restart from scratch.

自动配置 Husky、lint-staged 和 Prettier 的 pre-commit 钩子。检测包管理器,安装依赖,初始化 Husky,创建 lint-staged 和 Prettier 配置文件,并集成类型检查与测试脚本,最后验证钩子有效性。
用户希望添加 pre-commit hooks 用户需要设置 Husky 用户想配置 lint-staged 用户希望在提交时进行格式化、类型检查或测试
.agents/skills/setup-pre-commit/SKILL.md
npx skills add Remocn/remocn --skill setup-pre-commit -g -y
SKILL.md
Frontmatter
{
    "name": "setup-pre-commit",
    "description": "Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting\/typechecking\/testing."
}

Setup Pre-Commit Hooks

What This Sets Up

  • Husky pre-commit hook
  • lint-staged running Prettier on all staged files
  • Prettier config (if missing)
  • typecheck and test scripts in the pre-commit hook

Steps

1. Detect package manager

Check for package-lock.json (npm), pnpm-lock.yaml (pnpm), yarn.lock (yarn), bun.lockb (bun). Use whichever is present. Default to npm if unclear.

2. Install dependencies

Install as devDependencies:

husky lint-staged prettier

3. Initialize Husky

npx husky init

This creates .husky/ dir and adds prepare: "husky" to package.json.

4. Create .husky/pre-commit

Write this file (no shebang needed for Husky v9+):

npx lint-staged
npm run typecheck
npm run test

Adapt: Replace npm with detected package manager. If repo has no typecheck or test script in package.json, omit those lines and tell the user.

5. Create .lintstagedrc

{
  "*": "prettier --ignore-unknown --write"
}

6. Create .prettierrc (if missing)

Only create if no Prettier config exists. Use these defaults:

{
  "useTabs": false,
  "tabWidth": 2,
  "printWidth": 80,
  "singleQuote": false,
  "trailingComma": "es5",
  "semi": true,
  "arrowParens": "always"
}

7. Verify

  • .husky/pre-commit exists and is executable
  • .lintstagedrc exists
  • prepare script in package.json is "husky"
  • prettier config exists
  • Run npx lint-staged to verify it works

8. Commit

Stage all changed/created files and commit with message: Add pre-commit hooks (husky + lint-staged + prettier)

This will run through the new pre-commit hooks — a good smoke test that everything works.

Notes

  • Husky v9+ doesn't need shebangs in hook files
  • prettier --ignore-unknown skips files Prettier can't parse (images, etc.)
  • The pre-commit runs lint-staged first (fast, staged-only), then full typecheck and tests
指导测试驱动开发(TDD)实践,遵循红绿重构循环。强调通过公共接口(Seams)编写行为测试,避免实现耦合、同义反复和水平切片等反模式。要求先确认测试边界,坚持单一切片迭代,确保测试具备规范性和可维护性。
用户希望以测试优先方式构建功能或修复bug 提及 'red-green-refactor' 概念 需要编写集成测试 讨论测试设计原则或反模式
.agents/skills/tdd/SKILL.md
npx skills add Remocn/remocn --skill tdd -g -y
SKILL.md
Frontmatter
{
    "name": "tdd",
    "description": "Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions \"red-green-refactor\", or wants integration tests."
}

Test-Driven Development

TDD is the red → green loop. This skill is the reference that makes that loop produce tests worth keeping: what a good test is, where tests go, the anti-patterns, and the rules of the loop. Every section applies on every cycle — consult them before and during the loop, not after.

When exploring the codebase, read CONTEXT.md (if it exists) so test names and interface vocabulary match the project's domain language, and respect ADRs in the area you're touching.

What a good test is

Tests verify behavior through public interfaces, not implementation details. Code can change entirely; tests shouldn't. A good test reads like a specification — "user can checkout with valid cart" tells you exactly what capability exists — and survives refactors because it doesn't care about internal structure.

See tests.md for examples and mocking.md for mocking guidelines.

Seams — where tests go

A seam is the public boundary you test at: the interface where you observe behavior without reaching inside. Tests live at seams, never against internals.

Test only at pre-agreed seams. Before writing any test, write down the seams under test and confirm them with the user. No test is written at an unconfirmed seam. You can't test everything — agreeing the seams up front is how testing effort lands on the critical paths and complex logic instead of every edge case.

Ask: "What's the public interface, and which seams should we test?"

Anti-patterns

  • Implementation-coupled — mocks internal collaborators, tests private methods, or verifies through a side channel (querying the database instead of using the interface). The tell: the test breaks when you refactor but behavior hasn't changed.
  • Tautological — the assertion recomputes the expected value the way the code does (expect(add(a, b)).toBe(a + b), a snapshot derived by hand the same way, a constant asserted equal to itself), so it passes by construction and can never disagree with the code. Expected values must come from an independent source of truth — a known-good literal, a worked example, the spec.
  • Horizontal slicing — writing all tests first, then all implementation. Bulk tests verify imagined behavior: you test the shape of things rather than user-facing behavior, the tests go insensitive to real changes, and you commit to test structure before understanding the implementation. Work in vertical slices instead — one test → one implementation → repeat, each test a tracer bullet that responds to what the last cycle taught you.

Rules of the loop

  • Red before green. Write the failing test first, then only enough code to pass it. Don't anticipate future tests or add speculative features.
  • One slice at a time. One seam, one test, one minimal implementation per cycle.
  • Refactoring is not part of the loop. It belongs to the review stage (see the code-review skill), not the red → green implementation cycle.
用于在指定工作区内系统化教授用户新技能或概念。通过维护使命文档、学习记录和资源列表,结合结构化课程与参考材料,帮助用户从知识获取到技能掌握,注重长期记忆存储而非短期流利度,支持多会话渐进式学习。
用户请求学习特定主题或技能 需要建立长期学习计划时
.agents/skills/teach/SKILL.md
npx skills add Remocn/remocn --skill teach -g -y
SKILL.md
Frontmatter
{
    "name": "teach",
    "description": "Teach the user a new skill or concept, within this workspace.",
    "argument-hint": "What would you like to learn about?",
    "disable-model-invocation": true
}

The user has asked you to teach them something. This is a stateful request - they intend to learn the topic over multiple sessions.

Teaching Workspace

Treat the current directory as a teaching workspace. The state of their learning is captured in this directory in several files:

  • MISSION.md: A document capturing the reason the user is interested in the topic. This should be used to ground all teaching. Use the format in MISSION-FORMAT.md.
  • ./reference/*.html: A directory of reference materials. These are the compressed learnings from the lessons - cheat sheets, reference algorithms, syntax, yoga poses, glossaries. They are the raw units of learning. They should be beautiful documents which print out well, and are designed for quick reference.
  • RESOURCES.md: A list of resources which can be explored to ground your teaching in contextual knowledge, or to acquire knowledge and wisdom. Use the format in RESOURCES-FORMAT.md.
  • ./learning-records/*.md: A directory of learning records, which capture what the user has learned. These are loosely equivalent to architectural decision records in software development - they capture non-obvious lessons and key insights that may need to be revised later, or drive future sessions. These should be used to calculate the zone of proximal development. They are titled 0001-<dash-case-name>.md, where the number increments each time. Use the format in LEARNING-RECORD-FORMAT.md.
  • ./lessons/*.html: A directory of lessons. A lesson is a single, self-contained HTML output that teaches one tightly-scoped thing tied to the mission. This is the primary unit of teaching in this workspace.
  • ./assets/*: Reusable components shared across lessons. See Assets.
  • NOTES.md: A scratchpad for you to jot down user preferences, or working notes.

Philosophy

To learn at a deep level, the user needs three things:

  • Knowledge, captured from high-quality, high-trust resources
  • Skills, acquired through highly-relevant interactive lessons devised by you, based on the knowledge
  • Wisdom, which comes from interacting with other learners and practitioners

Before the RESOURCES.md is well-populated, your focus should be to find high-quality resources which will help the user acquire knowledge. Never trust your parametric knowledge.

Some topics may require more skills than knowledge. Learning more about theoretical physics might be more knowledge-based. For yoga, more skills-based.

Fluency vs Storage Strength

You should be careful to split between two types of learning:

  • Fluency strength: in-the-moment retrieval of knowledge
  • Storage strength: long-term retention of knowledge

Fluency can give the user an illusory sense of mastery, but storage strength is the real goal. Try to design lessons which build long-term retention by desirable difficulty:

  • Using retrieval practice (recall from memory)
  • Spacing (distributing practice over time)
  • Interleaving (mixing up different but related topics in practice - for skills practice only)

Lessons

A lesson is the main thing you produce — the unit in which knowledge and skills reach the user. Each lesson is one self-contained HTML file, saved to ./lessons/ and titled 0001-<dash-case-name>.html where the number increments each time.

A lesson should be beautiful — clean, readable typography and layout — since the user will return to these later to review. Think Tufte.

The lesson should be short, and completable very quickly. Learners' working memory is very small, and we need to stay within it. But each lesson should give the user a single tangible win that they can build on. It should be directly tied to the mission, and should be in the user's zone of proximal development.

If possible, open the lesson file for the user by running a CLI command.

Each lesson should link via HTML anchors to other lessons and reference documents.

Each lesson should recommend a primary source for the user to read or watch. This should be the most high-quality, high-trust resource you found on the topic.

Each lesson should contain a reminder to ask followup questions to the agent. The agent is their teacher, and can assist with anything that's unclear.

Assets

Lessons are built from reusable components, stored in ./assets/: stylesheets, quiz widgets, simulators, diagram helpers — anything a second lesson could reuse.

Reuse is the default, not the exception. Before authoring a lesson, read ./assets/ and build from the components already there. When a lesson needs something new and reusable, write it as a component in ./assets/ and link to it — never inline code a future lesson would duplicate.

A shared stylesheet is the first component every workspace earns: every lesson links it, so the lessons look like one consistent course rather than a pile of one-offs. As the workspace grows, so should the component library.

The Mission

Every lesson should be tied into the mission - the reason that the user is interested in learning about the topic.

If the user is unclear about the mission, or the MISSION.md is not populated, your first job should be to question the user on why they want to learn this.

Failing to understand the mission will mean knowledge acquisition is not grounded in real-world goals. Lessons will feel too abstract. You will have no way of judging what the user should do next.

Missions may change as the user develops more skills and knowledge. This is normal - make sure to update the MISSION.md and add a learning record to capture the change. Confirm with the user before changing the mission.

Zone Of Proximal Development

Each lesson, the user should always feel as if they are being challenged 'just enough'.

The user may specify an exact thing they want to learn. If they don't, figure out their zone of proximal development by:

  • Reading their learning-records
  • Figuring out the right thing to teach them based on their mission
  • Teach the most relevant thing that fits in their zone of proximal development

Knowledge

Lessons should be designed around a skill the user is going to learn. The knowledge in the lesson should be only what's required to acquire that skill. You teach the knowledge first, then get the user to practice the skills via an interactive feedback loop.

Knowledge should first be gathered from trusted resources. Use RESOURCES.md to keep track of them. Lessons should be littered with citations - links to external resources to back up any claim made. This increases the trustworthiness of the lesson.

For acquiring knowledge, difficulty is the enemy. It eats working memory you need for understanding.

Skills

If knowledge is all about acquisition, skills are about durability and flexibility. Make the knowledge stick.

For skill acquisition, difficulty is the tool. Effortful retrieval is what builds storage strength. Skills should be taught through interactive lessons. There are several tools at your disposal:

  • Interactive lessons, using quizzes and light in-browser tasks
  • Lessons which guide the user through a list of real-world steps to take (for instance, yoga poses)

Each of these should be based on a feedback loop, where the user receives feedback on their performance. This feedback loop should be as tight as possible, giving feedback immediately - and ideally automatically.

For quizzes, each answer should be exactly the same number of words (and characters, if possible). Don't give the user any clues about the answer through formatting.

Acquiring Wisdom

Wisdom comes from true real-world interaction - testing your skills outside the learning environment.

When the user asks a question that appears to require wisdom, your default posture should be to attempt to answer - but to ultimately delegate to a community.

A community is a place (online or offline) where the user can test their skills in the real world. This might be a forum, a subreddit, a real-world class (budget permitting) or a local interest group.

You should attempt to find high-reputation communities the user can join. If the user expresses a preference that they don't want to join a community, respect it.

Reference Documents

While creating lessons, you should also create reference documents. Lessons can reference these documents - they are useful for tracking raw units of knowledge useful across lessons.

Lessons will rarely be revisited later - reference documents will be. They should be the compressed essence of the lesson, in a format designed for quick reference.

Some learning topics lend themselves to reference:

  • Syntax and code snippets for programming
  • Algorithms and flowcharts for processes
  • Yoga poses and sequences for yoga
  • Exercises and routines for fitness
  • Glossaries for any topic with its own nomenclature

Glossaries, in particular, are an essential reference. Once one is created, it should be adhered to in every lesson.

NOTES.md

The user will sometimes express preferences of how they want to be taught, or things you should keep in mind. This is the place to record those preferences, so you can refer back to them when designing lessons or working with the user.

将当前对话上下文与代码库理解综合为规格说明书(PRD),无需额外访谈。需遵循特定模板,包含问题、解决方案、用户故事及实施决策等,并直接发布至项目Issue Tracker,标记为ready-for-agent。
需要生成功能规格说明书 基于已有讨论总结技术方案
.agents/skills/to-spec/SKILL.md
npx skills add Remocn/remocn --skill to-spec -g -y
SKILL.md
Frontmatter
{
    "name": "to-spec",
    "description": "Turn the current conversation into a spec and publish it to the project issue tracker — no interview, just synthesis of what you've already discussed.",
    "disable-model-invocation": true
}

This skill takes the current conversation context and codebase understanding and produces a spec (you may know this document as a PRD). Do NOT interview the user — just synthesize what you already know.

The issue tracker and triage label vocabulary should have been provided to you — run /setup-matt-pocock-skills if not.

Process

  1. Explore the repo to understand the current state of the codebase, if you haven't already. Use the project's domain glossary vocabulary throughout the spec, and respect any ADRs in the area you're touching.

  2. Sketch out the seams at which you're going to test the feature. Existing seams should be preferred to new ones. Use the highest seam possible. If new seams are needed, propose them at the highest point you can. The fewer seams across the codebase, the better - the ideal number is one.

Check with the user that these seams match their expectations.

  1. Write the spec using the template below, then publish it to the project issue tracker. Apply the ready-for-agent triage label - no need for additional triage.

Problem Statement

The problem that the user is facing, from the user's perspective.

Solution

The solution to the problem, from the user's perspective.

User Stories

A LONG, numbered list of user stories. Each user story should be in the format of:

  1. As an , I want a , so that
1. As a mobile bank customer, I want to see balance on my accounts, so that I can make better informed decisions about my spending

This list of user stories should be extremely extensive and cover all aspects of the feature.

Implementation Decisions

A list of implementation decisions that were made. This can include:

  • The modules that will be built/modified
  • The interfaces of those modules that will be modified
  • Technical clarifications from the developer
  • Architectural decisions
  • Schema changes
  • API contracts
  • Specific interactions

Do NOT include specific file paths or code snippets. They may end up being outdated very quickly.

Exception: if a prototype produced a snippet that encodes a decision more precisely than prose can (state machine, reducer, schema, type shape), inline it within the relevant decision and note briefly that it came from a prototype. Trim to the decision-rich parts — not a working demo, just the important bits.

Testing Decisions

A list of testing decisions that were made. Include:

  • A description of what makes a good test (only test external behavior, not implementation details)
  • Which modules will be tested
  • Prior art for the tests (i.e. similar types of tests in the codebase)

Out of Scope

A description of the things that are out of scope for this spec.

Further Notes

Any further notes about the feature.

将计划、规范或对话拆解为可独立验证的追踪子弹式工单,明确依赖关系。支持代码库探索与重构策略,通过交互确认粒度后发布至跟踪器。
用户要求将计划或规范拆分为工单 用户希望基于当前对话生成任务列表
.agents/skills/to-tickets/SKILL.md
npx skills add Remocn/remocn --skill to-tickets -g -y
SKILL.md
Frontmatter
{
    "name": "to-tickets",
    "description": "Break a plan, spec, or the current conversation into a set of tracer-bullet tickets, each declaring its blocking edges, published to the configured tracker — edges as text in a local file, or native blocking links on a real tracker.",
    "disable-model-invocation": true
}

To Tickets

Break a plan, spec, or conversation into a set of tickets — tracer-bullet vertical slices, each declaring the tickets that block it.

The issue tracker and triage label vocabulary should have been provided to you — run /setup-matt-pocock-skills if not.

Process

1. Gather context

Work from whatever is already in the conversation context. If the user passes a reference (a spec path, an issue number or URL) as an argument, fetch it and read its full body and comments.

2. Explore the codebase (optional)

If you have not already explored the codebase, do so to understand the current state of the code. Ticket titles and descriptions should use the project's domain glossary vocabulary, and respect ADRs in the area you're touching.

Look for opportunities to prefactor the code to make the implementation easier. "Make the change easy, then make the easy change."

3. Draft vertical slices

Break the work into tracer bullet tickets.

  • Each slice cuts a narrow but COMPLETE path through every layer (schema, API, UI, tests) — vertical, NOT a horizontal slice of one layer
  • A completed slice is demoable or verifiable on its own
  • Each slice is sized to fit in a single fresh context window
  • Any prefactoring should be done first

Give each ticket its blocking edges — the other tickets that must complete before it can start. A ticket with no blockers can start immediately.

Wide refactors are the exception to vertical slicing. A wide refactor is one mechanical change — rename a column, retype a shared symbol — whose blast radius fans across the whole codebase, so a single edit breaks thousands of call sites at once and no vertical slice can land green. Don't force it into a tracer bullet; sequence it as expand–contract. First expand: add the new form beside the old so nothing breaks. Then migrate the call sites over in batches sized by blast radius (per package, per directory), each batch its own ticket blocked by the expand, keeping CI green batch to batch because the old form still exists. Finally contract: delete the old form once no caller remains, in a ticket blocked by every migrate batch. When even the batches can't stay green alone, keep the sequence but let them share an integration branch that all block a final integrate-and-verify ticket — green is promised only there.

4. Quiz the user

Present the proposed breakdown as a numbered list. For each ticket, show:

  • Title: short descriptive name
  • Blocked by: which other tickets (if any) must complete first
  • What it delivers: the end-to-end behaviour this ticket makes work

Ask the user:

  • Does the granularity feel right? (too coarse / too fine)
  • Are the blocking edges correct — does each ticket only depend on tickets that genuinely gate it?
  • Should any tickets be merged or split further?

Iterate until the user approves the breakdown.

5. Publish the tickets to the configured tracker

Publish the approved tickets. How depends on the tracker /setup-matt-pocock-skills configured — the tickets are the same either way, only the shape of the blocking edges changes:

  • Local files → write one tickets.md in the repo root, all tickets in dependency order (blockers first), each with its "Blocked by" listing the titles it depends on. Use the file template below.
  • A real issue tracker (GitHub, Linear, …) → publish one issue per ticket in dependency order (blockers first) so each ticket's blocking edges can reference real identifiers. Use the platform's native blocking / sub-issue relationship where it has one; otherwise set each ticket's "Blocked by" to the blocking issues. Apply the ready-for-agent triage label unless instructed otherwise — the tickets are agent-grabbable by construction.

Do NOT close or modify any parent issue.

Tickets:

A one-line summary of what these tickets build. Reference the source spec if there is one.

Work the frontier: any ticket whose blockers are all done. For a purely linear chain that means top to bottom.

<Ticket title>

What to build: the end-to-end behaviour this ticket makes work, from the user's perspective — not a layer-by-layer implementation list.

Blocked by: the titles of the tickets that gate this one, or "None — can start immediately".

  • Acceptance criterion 1
  • Acceptance criterion 2

<Ticket title>

...

Parent

A reference to the parent issue on the tracker (if the source was an existing issue, otherwise omit this section).

What to build

The end-to-end behaviour this ticket makes work, from the user's perspective — not layer-by-layer implementation.

Acceptance criteria

  • Criterion 1
  • Criterion 2

Blocked by

  • A reference to each blocking ticket, or "None — can start immediately".

In either form, avoid specific file paths or code snippets — they go stale fast. Exception: if a prototype produced a snippet that encodes a decision more precisely than prose can (state machine, reducer, schema, type shape), inline it and note briefly that it came from a prototype. Trim to the decision-rich parts — not a working demo, just the important bits.

Work the frontier one ticket at a time with /implement, clearing context between tickets.

用于通过状态机管理Issue和PR的优先级分类与流转。支持将项目问题分为bug或增强,并推进至待处理、需信息、就绪代理等状态,生成AI摘要并协助维护者高效筛选和处理任务。
用户输入 /triage 命令 请求查看需要关注的问题或PR 指定特定Issue或PR进行状态变更 查询已准备好由Agent处理的任务
.agents/skills/triage/SKILL.md
npx skills add Remocn/remocn --skill triage -g -y
SKILL.md
Frontmatter
{
    "name": "triage",
    "description": "Move issues and external PRs through a state machine of triage roles — categorise, verify, grill if needed, and write agent-ready briefs.",
    "disable-model-invocation": true
}

Triage

Move issues on the project issue tracker through a small state machine of triage roles.

If this repo treats external pull requests as a request surface (see the issue-tracker config), triage covers them too: a PR is an issue with attached code — same roles, same states, same machine, with a few deltas marked "for a PR" below. Resolve a bare #42 to an issue or PR per the tracker config.

Every comment or issue posted to the issue tracker during triage must start with this disclaimer:

> *This was generated by AI during triage.*

Reference docs

Roles

Two category roles:

  • bug — something is broken
  • enhancement — new feature or improvement

Five state roles:

  • needs-triage — maintainer needs to evaluate
  • needs-info — waiting on reporter for more information
  • ready-for-agent — fully specified, ready for an AFK agent
  • ready-for-human — needs human implementation
  • wontfix — will not be actioned

For a PR, the same states read against the attached code: ready-for-agent means a brief is attached and an agent should take the next step on the diff; ready-for-human means it's ready for a human to merge.

Every triaged issue should carry exactly one category role and one state role. If state roles conflict, flag it and ask the maintainer before doing anything else.

These are canonical role names — the actual label strings used in the issue tracker may differ. The mapping should have been provided to you - run /setup-matt-pocock-skills if not.

State transitions: an unlabeled issue normally goes to needs-triage first; from there it moves to needs-info, ready-for-agent, ready-for-human, or wontfix. needs-info returns to needs-triage once the reporter replies. The maintainer can override at any time — flag transitions that look unusual and ask before proceeding.

Invocation

The maintainer invokes /triage and describes what they want in natural language. Interpret the request and act. Examples:

  • "Show me anything that needs my attention"
  • "Let's look at #42" (issue or PR)
  • "Move #42 to ready-for-agent"
  • "What's ready for agents to pick up?"

Show what needs attention

Query the issue tracker and present three buckets, oldest first:

  1. Unlabeled — never triaged.
  2. needs-triage — evaluation in progress.
  3. needs-info with reporter activity since the last triage notes — needs re-evaluation.

When PRs are in scope, include external PRs in these buckets and tag each line [PR] or [issue]. Discovery surfaces only external PRs (the tracker config defines who counts as external) — a collaborator's in-flight PR is not triage work. This filter is discovery-only; an explicitly named PR is always triaged regardless of author.

Show counts and a one-line summary per item. Let the maintainer pick.

Triage a specific issue or PR

  1. Gather context. Read the full issue or PR (body, comments, labels, author, dates; for a PR, the diff too). Parse any prior triage notes so you don't re-ask resolved questions. Explore the codebase using the project's domain glossary, respecting ADRs in the area. Run two checks against the codebase: (a) redundancy — search for an existing implementation of the requested behavior by domain concept (not just the request's wording), and report where you looked. If found, it's an already-implemented wontfix (step 5). (b) prior rejection — read .out-of-scope/*.md and surface any that resembles this request.

  2. Recommend. Tell the maintainer your category and state recommendation with reasoning, plus a brief codebase summary relevant to the request — including whether it's already implemented. Wait for direction.

  3. Verify the claim. Before any grilling, check that the claim holds up. For a bug, reproduce it from the reporter's steps. For a PR, confirm the diff does what it claims — check it out, run the relevant tests or commands. Report what happened: confirmed (with code path), failed, or insufficient detail (a strong needs-info signal). A confirmed verification makes a much stronger agent brief.

  4. Grill (if needed). If the request needs fleshing out, run the /grilling and /domain-modeling skills together — grill it into shape one question at a time, sharpening domain terms and updating CONTEXT.md/ADRs inline as decisions land.

  5. Apply the outcome:

    • ready-for-agent — post an agent brief comment (AGENT-BRIEF.md).
    • ready-for-human — same structure as an agent brief, but note why it can't be delegated (judgment calls, external access, design decisions, manual testing).
    • needs-info — post triage notes (template below).
    • wontfix — close, with the comment depending on why:
      • Already implemented — the change already exists in the codebase. Point to where it lives; do not write to .out-of-scope/ (that KB is for rejected requests, not built ones).
      • Rejected (bug) — polite explanation, then close.
      • Rejected (enhancement) — write to .out-of-scope/, link to it from a comment, then close (OUT-OF-SCOPE.md).
    • needs-triage — apply the role. Optional comment if there's partial progress.

Quick state override

If the maintainer says "move #42 to ready-for-agent", trust them and apply the role directly. Confirm what you're about to do (role changes, comment, close), then act. Skip grilling. If moving to ready-for-agent without a grilling session, ask whether they want to write an agent brief.

Needs-info template

## Triage Notes

**What we've established so far:**

- point 1
- point 2

**What we still need from you (@reporter):**

- question 1
- question 2

Capture everything resolved during grilling under "established so far" so the work isn't lost. Questions must be specific and actionable, not "please provide more info".

Resuming a previous session

If prior triage notes exist on the issue or PR, read them, check whether the reporter has answered any outstanding questions, and present an updated picture before continuing. Don't re-ask resolved questions.

从对话中提取领域术语,消除歧义并建立统一词汇表,保存至UBIQUITOUS_LANGUAGE.md。适用于定义领域术语、构建 glossary、强化术语一致性或提及 DDD 和领域模型时。
用户希望定义领域术语 用户希望构建术语表 用户希望强化术语一致性 用户希望创建通用语言 提及 'domain model' 或 'DDD'
.agents/skills/ubiquitous-language/SKILL.md
npx skills add Remocn/remocn --skill ubiquitous-language -g -y
SKILL.md
Frontmatter
{
    "name": "ubiquitous-language",
    "description": "Extract a DDD-style ubiquitous language glossary from the current conversation, flagging ambiguities and proposing canonical terms. Saves to UBIQUITOUS_LANGUAGE.md. Use when user wants to define domain terms, build a glossary, harden terminology, create a ubiquitous language, or mentions \"domain model\" or \"DDD\".",
    "disable-model-invocation": true
}

Ubiquitous Language

Extract and formalize domain terminology from the current conversation into a consistent glossary, saved to a local file.

Process

  1. Scan the conversation for domain-relevant nouns, verbs, and concepts
  2. Identify problems:
    • Same word used for different concepts (ambiguity)
    • Different words used for the same concept (synonyms)
    • Vague or overloaded terms
  3. Propose a canonical glossary with opinionated term choices
  4. Write to UBIQUITOUS_LANGUAGE.md in the working directory using the format below
  5. Output a summary inline in the conversation

Output Format

Write a UBIQUITOUS_LANGUAGE.md file with this structure:

# Ubiquitous Language

## Order lifecycle

| Term        | Definition                                              | Aliases to avoid      |
| ----------- | ------------------------------------------------------- | --------------------- |
| **Order**   | A customer's request to purchase one or more items      | Purchase, transaction |
| **Invoice** | A request for payment sent to a customer after delivery | Bill, payment request |

## People

| Term         | Definition                                  | Aliases to avoid       |
| ------------ | ------------------------------------------- | ---------------------- |
| **Customer** | A person or organization that places orders | Client, buyer, account |
| **User**     | An authentication identity in the system    | Login, account         |

## Relationships

- An **Invoice** belongs to exactly one **Customer**
- An **Order** produces one or more **Invoices**

## Example dialogue

> **Dev:** "When a **Customer** places an **Order**, do we create the **Invoice** immediately?"
> **Domain expert:** "No — an **Invoice** is only generated once a **Fulfillment** is confirmed. A single **Order** can produce multiple **Invoices** if items ship in separate **Shipments**."
> **Dev:** "So if a **Shipment** is cancelled before dispatch, no **Invoice** exists for it?"
> **Domain expert:** "Exactly. The **Invoice** lifecycle is tied to the **Fulfillment**, not the **Order**."

## Flagged ambiguities

- "account" was used to mean both **Customer** and **User** — these are distinct concepts: a **Customer** places orders, while a **User** is an authentication identity that may or may not represent a **Customer**.

Rules

  • Be opinionated. When multiple words exist for the same concept, pick the best one and list the others as aliases to avoid.
  • Flag conflicts explicitly. If a term is used ambiguously in the conversation, call it out in the "Flagged ambiguities" section with a clear recommendation.
  • Only include terms relevant for domain experts. Skip the names of modules or classes unless they have meaning in the domain language.
  • Keep definitions tight. One sentence max. Define what it IS, not what it does.
  • Show relationships. Use bold term names and express cardinality where obvious.
  • Only include domain terms. Skip generic programming concepts (array, function, endpoint) unless they have domain-specific meaning.
  • Group terms into multiple tables when natural clusters emerge (e.g. by subdomain, lifecycle, or actor). Each group gets its own heading and table. If all terms belong to a single cohesive domain, one table is fine — don't force groupings.
  • Write an example dialogue. A short conversation (3-5 exchanges) between a dev and a domain expert that demonstrates how the terms interact naturally. The dialogue should clarify boundaries between related concepts and show terms being used precisely.

Example dialogue

Dev: "How do I test the sync service without Docker?"

Domain expert: "Provide the filesystem layer instead of the Docker layer. It implements the same Sandbox service interface but uses a local directory as the sandbox."

Dev: "So sync-in still creates a bundle and unpacks it?"

Domain expert: "Exactly. The sync service doesn't know which layer it's talking to. It calls exec and copyIn — the filesystem layer just runs those as local shell commands."

Re-running

When invoked again in the same conversation:

  1. Read the existing UBIQUITOUS_LANGUAGE.md
  2. Incorporate any new terms from subsequent discussion
  3. Update definitions if understanding has evolved
  4. Re-flag any new ambiguities
  5. Rewrite the example dialogue to incorporate new terms
Wayfinder用于规划超出单次会话的大规模工作。它将任务转化为问题追踪器中的共享地图(Issue),通过逐一解决子工单来明确路径,侧重决策而非执行,直至目标清晰后移交。
需要规划大型复杂项目或任务 当前思路模糊且无法在单次会话中完成 需要将大问题拆解为可管理的调查工单
.agents/skills/wayfinder/SKILL.md
npx skills add Remocn/remocn --skill wayfinder -g -y
SKILL.md
Frontmatter
{
    "name": "wayfinder",
    "description": "Plan a huge chunk of work — more than one agent session can hold — as a shared map of investigation tickets on your issue tracker, and resolve them one at a time until the way to the destination is clear.",
    "disable-model-invocation": true
}

A loose idea has arrived — too big for one agent session, and wrapped in fog: the way from here to the destination isn't visible yet. Wayfinding is about finding that way, not charging at the destination. This skill charts the way as a shared map on the repo's issue tracker, then works its tickets one at a time until the route is clear.

The destination varies per effort, and naming it is the first act of charting — it shapes every ticket. It might be a spec to hand off and iterate on, a decision to lock before planning starts, or a change made in place like a data-structure migration. The map is domain-agnostic — engineering work, course content, whatever fits the shape.

Plan, don't do

Wayfinder is planning by default: each ticket resolves a decision, and the map is done when the way is clear — nothing left to decide before someone goes and does the thing. The pull to just do the work is usually the signal you've reached the edge of the map and it's time to hand off. An effort can override this in its Notes — carrying execution into the map itself — but absent that, produce decisions, not deliverables.

Refer by name

Every map and ticket is an issue, so it has a name — its title. In everything the human reads — narration, the map's Decisions-so-far — refer to it by that name, never by a bare id, number, or slug. A wall of #42, #43, #44 is illegible; names read at a glance. The id and URL don't vanish — a name wraps its link — but they ride inside the name, never stand in for it.

The Map

The map is a single issue on this repo's issue tracker, labelled wayfinder:map — the canonical artifact. Its tickets are child issues of the map.

The map is an index, not a store. It lists the decisions made and points at the tickets that hold their detail; a decision lives in exactly one place — its ticket — so the map never restates it, only gists it and links.

Where the map, its child tickets, blocking, and frontier queries physically live is tracker-specific. The issue tracker should have been provided to you — run /setup-matt-pocock-skills if not. Consult the tracker doc's "Wayfinding operations" section for how this repo expresses them. If no tracker has been provided, default to the local-markdown tracker.

The map body

The whole map at low resolution, loaded once per session. Open tickets are not listed — they are open child issues, found by query.

## Destination

<what reaching the end of this map looks like — the spec, decision, or change this effort is finding its way to. One or two lines; every session orients to it before choosing a ticket.>

## Notes

<domain; skills every session should consult; standing preferences for this effort>

## Decisions so far

<!-- the index — one line per closed ticket: enough to judge relevance, then zoom the link for the detail the ticket holds -->

- [<closed ticket title>](link) — <one-line gist of the answer>

## Not yet specified

<!-- see "Fog of war": in-scope fog you can't ticket yet; graduates as the frontier advances -->

## Out of scope

<!-- see "Out of scope": work ruled beyond the destination; closed, never graduates -->

Tickets

Each ticket is a child issue of the map; the tracker's issue id is its identity. Its body is the question, sized to one 100K token agent session:

## Question

<the decision or investigation this ticket resolves>

Each ticket carries a wayfinder:<type> label — one of research, prototype, grilling, task (see Ticket Types).

A session claims a ticket by assigning it to the dev driving the map, first, before any work, so concurrent sessions skip it. That assignee is the claim: an open, unassigned ticket is unclaimed.

Blocking uses the tracker's native dependency relationship — essential because it renders the frontier visually in the tracker's own UI, so the human sees what's takeable without opening the map. Only a tracker that lacks native blocking falls back to a body convention. A ticket is unblocked when every ticket blocking it is closed; the frontier is the open, unblocked, unclaimed children — the edge of the known.

The answer isn't part of the body — it's recorded on resolution (see Work through the map). Assets created while resolving a ticket are linked from the issue, not pasted in.

Ticket Types

Every ticket is either HITL — human in the loop, worked with a human who speaks for themselves — or AFK, driven by the agent alone. A HITL ticket only resolves through that live exchange; the agent never stands in for the human's side of it (a grilling agent that answers its own questions has broken this).

  • Research (AFK): Reading documentation, third-party APIs, or local resources like knowledge bases. Creates a markdown summary as a linked asset. Use when knowledge outside the current working directory is required.
  • Prototype (HITL): Raise the fidelity of the discussion by making a cheap, rough, concrete artifact to react to — an outline, a rough take, a stub, or UI/logic code via the /prototype skill. Links the prototype as an asset. Use when "how should it look" or "how should it behave" is the key question.
  • Grilling (HITL): Conversation via the /grilling and /domain-modeling skills, one question at a time. The default case.
  • Task (HITL or AFK): Manual work that must happen before a decision can be made — nothing to decide, prototype, or research, but the discussion is blocked until it's done. Signing up for a service so its API can be judged, provisioning access, moving data so its shape can be seen. This is the one type that does rather than decides — and it earns its place by unblocking a decision, not by delivering the destination. The agent drives it alone where it can (AFK); otherwise it hands the human a precise checklist (HITL). Resolved when the work is done; the answer records what was done and any resulting facts (credentials location, new URLs, row counts) later tickets depend on.

Fog of war

The map is deliberately incomplete: don't chart what you can't yet see. Beyond the live tickets lies the fog of war — the dim view of decisions and investigations you can tell are coming but can't yet pin down, because they hang on questions still open. Resolving a ticket clears the fog ahead of it, graduating whatever's now specifiable into fresh tickets — one at a time, until the way to the destination is clear and no tickets remain.

The map's Not yet specified section is where that dim view is written down: the suspected question, the area to revisit later. It's the undiscovered frontier toward the destination — everything here is in scope, just not sharp enough to ticket. Write as loosely or as fully as the view allows; it doubles as a signpost for collaborators reading where the effort is headed.

Fog or ticket? The test is whether you can state the question precisely now — not whether you can answer it now.

  • Ticket when the question is already sharp — even if it's blocked and you can't act on it yet.
  • Not yet specified when you can't yet phrase it that sharply. Don't pre-slice the fog into ticket-sized pieces: it's coarser than a ticket, and one patch may graduate into several tickets, or none, once the frontier reaches it.

Not yet specified excludes what's already decided (Decisions so far), what's already a live ticket, and what's out of scope (the next section).

Out of scope

Fog only ever gathers toward the destination. The destination fixes the scope, so work beyond it is out of scope — it isn't fog, and it doesn't belong in Not yet specified. It gets its own Out of scope section on the map: work you've consciously ruled out of this effort. Scope, not sharpness, lands it here.

Out-of-scope work never graduates — the frontier stops at the destination — so it returns only if the destination is redrawn, and then as a fresh effort, not a resumption.

Ruling something out of scope is a scoping act, not a step on the route. When a ticket that already exists turns out to sit past the destination — mis-scoped in while charting, or exposed by a resolution — close it (a closed ticket is unambiguously off the frontier) and leave one line in the Out of scope section: the gist plus why it's out of scope, linking the closed ticket. It stays out of Decisions so far, which records the route actually walked — a scope boundary isn't a step on it.

Invocation

Two modes. Either way, never resolve more than one ticket per session.

Chart the map

User invokes with a loose idea.

  1. Name the destination. Run a /grilling and /domain-modeling session to pin down what this map is finding its way to — the spec, decision, or change. The destination fixes the scope, so it's settled first.
  2. Map the frontier. Grill again, breadth-first this time: fan out across the whole space rather than deep on any one thread, surfacing the open decisions and the first steps takeable now. If this surfaces no fog — the way to the destination is already clear, the whole journey small enough for one session — you don't need a map. Stop and ask the user how they'd like to proceed.
  3. Create the map (label wayfinder:map): Destination and Notes filled in, Decisions-so-far empty, the fog sketched into Not yet specified.
  4. Create the tickets you can specify now as child issues of the map — then wire blocking edges in a second pass (issues need ids before they can reference each other). Wiring sorts them into the frontier and the blocked; everything you can't yet specify stays in the fog — the Not yet specified section.
  5. Stop — charting the map is one session's work; do not also resolve tickets.

Work through the map

User invokes with a map (URL or number). A ticket is optional — without one, you pick the next decision, not the user.

  1. Load the map — the low-res view, not every ticket body.
  2. Choose the ticket. If the user named one, use it. Otherwise take the first frontier ticket in order. Claim it: assign it to yourself before any work.
  3. Resolve it — zoom as needed: fetch the full body of any related or closed ticket on demand; invoke the skills the ## Notes block names. If in doubt, use /grilling and /domain-modeling.
  4. Record the resolution: post the answer as a resolution comment, close the issue, and append a context pointer to the map's Decisions-so-far.
  5. Add newly-surfaced tickets (create-then-wire); graduate any fog the answer has made specifiable, clearing each graduated patch from Not yet specified so it lives only as its new ticket. If the answer reveals a ticket — this one or another — sits beyond the destination, rule it out of scope rather than resolving it on the route. If the decision invalidates other parts of the map, update or delete those tickets.

The user may run unblocked tickets in parallel, so expect other sessions to be editing the tracker concurrently.

生成交互式Bash向导脚本,引导用户逐步完成第三方配置、迁移或状态转换。自动处理URL打开、值捕获、确认及.env/GitHub Secrets写入,基于模板确保一致性,旨在简化繁琐的手动流程。
需要执行繁琐的第三方服务手动配置 执行一次性数据迁移或项目状态转换 需要标准化重复的环境变量或密钥设置流程
.agents/skills/wizard/SKILL.md
npx skills add Remocn/remocn --skill wizard -g -y
SKILL.md
Frontmatter
{
    "name": "wizard",
    "description": "Generate an interactive bash wizard that walks a human through a manual procedure — third-party setup, a one-off migration, an A→B state transition — opening URLs, capturing values, confirming each step, and writing .env files and GitHub Actions secrets.",
    "disable-model-invocation": true
}

Wizard

A wizard is a bash script that walks a human, step by step, through a manual procedure that's tedious to do by hand and tedious to re-explain to an AI every time. It opens each URL, says exactly what to click and copy, captures the values, writes them where they belong (.env, GitHub secrets), confirms at every stage, and shows how much is left. It might configure third-party services, run a one-off migration, or move the project from one state to another.

The delightful UX is already solved by template.sh — progress with time-remaining, confirmation gates, cross-platform URL opening (including WSL), hidden secret entry, idempotent .env upserts, gh secret/gh variable writes, and a closing summary. Your job is only to scope the procedure and author its stages. The library above the STAGES marker is identical in every wizard; that consistency is the point — never hand-edit it.

A wizard is ephemeral by default — built for one run, saved to a scratch or scripts/ path, deleted when the job's done. Commit it only when the user wants a repeatable setup path that should live in the repo.

Process

1. Scope the procedure

Work out every manual step the human must take and every value that gets captured along the way. Read the repo first — don't ask cold:

  • For setup: .env, .env.example, .env.*, README, docker-compose*, framework config, and .github/workflows/* (every secrets.* / vars.* reference is a value the wizard must produce).
  • For a migration or transition: the current state, the target state, and the irreversible actions between them.

Then show the user the ordered list of stages and the values each produces, and confirm — they may add, drop, or reorder.

Done when: every stage is named in order, and for each captured value you know (a) where the human gets it, (b) where it's written (.env, a GitHub secret, both, or nowhere — some stages are pure actions), and (c) whether it's secret (hidden entry) or public.

2. Map each stage's journey

For each stage, write the precise path a human follows: which URL to open, what to do there, where a value is shown, which variable it fills — e.g. "Dashboard → Developers → API keys → Reveal test key → copy". Where you don't actually know the current UI or the exact command, say so and ask the user or check the docs — never invent steps that may not exist.

Done when: every stage traces to concrete instructions a stranger could follow.

3. Author the wizard

Copy template.sh to the target path. Replace the example stage with one stage per step, in dependency order. Use the library helpers — stage, say/step, open_url, ask/ask_secret, write_env, set_secret/set_var, pause/confirm — and set TOTAL_STAGES and TOTAL_MINUTES to honest estimates (this drives the time-remaining display).

Hold the bar the template sets: open the URL before asking for its value, use ask_secret for anything secret, write_env every persisted value, set_secret only the values CI actually needs, and confirm before any irreversible action. Each stage clears the screen so only the current step is visible — keep a stage to one focused task so nothing the human needs scrolls away. Don't touch the library above the marker.

4. Verify and hand off

  • bash -n <script>; run shellcheck if available.
  • chmod +x <script>.
  • Don't run it end-to-end yourself — it opens browsers and blocks on human input. Trace it statically instead: every value from step 1 is captured and lands where step 1 said, and every set_secret name exactly matches a secrets.* reference in CI.
  • Tell the user how to run it. If it's a repeatable setup path, commit it and link it from the README so the next person runs the script instead of asking an AI.
将原始素材转化为结构化的文章。通过交互式选择,逐步构建内容,确保每个概念在后续使用前提前解释(Grounding)。用户决定写作路径,助手逐段生成并保存,直至文章自然结束。
用户提供包含原始素材的Markdown文件 用户希望以分步交互方式撰写长文
.agents/skills/writing-beats/SKILL.md
npx skills add Remocn/remocn --skill writing-beats -g -y
SKILL.md
Frontmatter
{
    "name": "writing-beats",
    "description": "Writing, exploit — assemble raw material into a journey of beats, grounding each term before a beat leans on it.",
    "disable-model-invocation": true
}

The user has passed (or will pass) a markdown file of raw material. This is exploit: the exploring is done, the pile is fixed — commit to a path through it and mine the pile to fill each beat.

If the user did not say where to save the article, ask once and remember the path.

Then run a beat-by-beat journey, choose-your-own-adventure style:

  1. Establish the prerequisites. Before any beats, settle with the user what the audience already knows walking in — the concepts that are grounded from the start. Everything else must be grounded by a beat before a later beat can use it. See Grounding.
  2. Write 2–3 candidate starting beats, drawn from the raw material. Each is a different entry point into the article. Each may only lean on grounded concepts; note what new concepts each one grounds. Show the user the beats before writing to the article file. The user picks one. Preview what beats that pick unlocks — as if the user is seeing a little way down the path.
  3. Once the user picks a starting beat, write only that beat to the article file. A beat may be one sentence or several paragraphs — whatever that beat naturally is. Stop there.
  4. Re-read the article file from disk. Then offer 2–3 candidate next beats — different directions the journey could pivot to from where the article now stands. Each must be reachable from the current grounded set; note what each one grounds.
  5. Loop steps 3–5 until the article reaches a natural end.

Grounding

Every concept has to be grounded before a beat can lean on it: the audience either walked in knowing it or met it in an earlier beat. A beat that reaches for an ungrounded concept loses the reader — that is the one move the journey can't make. The unit is the concept, not the word for it: a beat can lean on an idea the reader lacks even with no jargon in sight. Where a concept has a name — a term — grounding it means landing the idea and the term together.

A concept gets grounded one of two ways:

  • Prerequisite — grounded before the first beat. The audience brings it. Fixed at the start.
  • Introduced — a beat establishes it, and from then on it's grounded for every later beat.

So each beat does two jobs: it requires concepts that are already grounded, and it grounds new ones. Keep a running list of what's grounded so far, and update it each time a beat lands.

This is what shapes the choose-your-own-adventure. A candidate beat is only reachable if everything it requires is already grounded; picking a beat that grounds concept X unlocks every beat that was waiting on X. When you offer next beats, they must all be reachable from the current grounded set — and say what each one grounds, so the user can see which paths it opens.

The big lever is what you make a prerequisite versus what you ground inside the piece. Demand too much up front and you shut out readers who don't have it; ground too much inside and the early beats drown in definitions. Settle this with the user when you establish prerequisites, and revisit it whenever a tempting beat turns out to require a concept nothing has grounded yet — the fix is either a grounding beat before it, or promoting the concept to a prerequisite.

What is a beat

A beat is one move in the journey. It does one thing — sets a scene, lands a point, asks a question, drops an aside, twists the angle. Then it stops, leaving the reader at a place where the next beat can pivot.

A beat is sized by what it needs:

  • A single sentence if that's all the move is ("And then nothing happened for three weeks.").
  • A short paragraph if the move needs setup.
  • Multiple paragraphs if the beat is a self-contained vignette, argument, or example.

If a "beat" needs five paragraphs and three subheadings, it's not a beat — it's two beats glued together. Split it.

Pulling from the pile

Pull material from the raw pile to populate each beat. You can paraphrase, split, recombine, or quote. The pile is a quarry.

Ending the journey

The article ends when the journey is complete — not when the pile is empty. Most piles will have leftover fragments that don't make it in. That is fine; that is the point of having more raw material than you need.

Writing rhythm

  • Append one beat at a time. Never write ahead.
  • Re-read the article file from disk before every write. Preserve user edits absolutely.
  • If the user edits a previous beat substantially, let it change what comes next.
  • If the user says "rewrite that beat" or "go back and try a different beat 3", do it — edit in place, leave the rest alone.
用于写作初期的探索阶段,通过对话挖掘原始素材片段。不构建结构,仅记录可读的短句、观点或比喻等碎片化内容,旨在拓宽创作空间,为后续结构化写作积累素材。
用户希望进行头脑风暴或收集写作灵感 需要记录零散的观察、想法或金句 处于写作构思早期,尚未确定文章结构
.agents/skills/writing-fragments/SKILL.md
npx skills add Remocn/remocn --skill writing-fragments -g -y
SKILL.md
Frontmatter
{
    "name": "writing-fragments",
    "description": "Writing, explore — mine raw fragments, no structure yet.",
    "disable-model-invocation": true
}

This is pure explore: widen the space of what could be written without committing to structure — committing is exploit, a separate skill's job. Run a grilling session that produces fragments, interviewing the user relentlessly about whatever they want to write about. Imposing phases, outlines, or article structure is out of scope here.

As fragments emerge from either side of the conversation, append them to a single markdown file.

If the user did not pass a path, ask once where to save the document, then remember it for the rest of the session.

Capture fragments from the very first thing the user says, including the initial prompt.

On first write, put a single H1 at the top with a working title (it can change later) and nothing else — no metadata, no TOC, no date.

What is a fragment

A fragment is any piece of text that might survive into the final article. It must be readable by the author — the author can tell what it means — but it does not need to define its terms or be comprehensible to a cold reader. The bar is "is this a piece of good writing?", not "is this a self-contained argument?"

Fragments are deliberately heterogeneous. Examples of what could be a fragment:

  • A sharp sentence you'd want to deploy somewhere but don't yet know where.
  • A claim with a one-line justification.
  • A vignette: a thing that happened, a code snippet, a scenario, an analogy.
  • A half-thought: "something about how X feels like Y, work this out later."
  • A quote, a piece of dialogue, an overheard line.
  • A list of related observations that hang together by feel.
  • A complaint, a confession, a punchline.
  • A leading word — a compact metaphor or coinage the whole piece can hang on (one term that names the idea, the way tracer bullets or fog of war names a whole pattern).

Of these, the leading word is the most valuable fragment to land. It is load-bearing: name the right one in explore and it shapes the structure, the transitions, and the title later — paying dividends through the entire exploit phase. When the conversation circles a recurring idea, push to coin a word for it.

The novelist's diary is the model: years of unstructured noticings that later get mined for raw material. Fragments are noticings.

File format

# Working title

A first fragment lives here.

It can be multiple paragraphs. It can include lists, code, quotes — whatever
shape the fragment naturally takes.

---

A second fragment.

---

> A quoted line that the user wants to keep around.

A reaction to it.

---

- A cluster of related observations
- That hang together by feel
- And want to be near each other

Fragments are separated by a horizontal rule (\n---\n). No headings inside the body. No tags. No order beyond the order they were added.

Writing rhythm

Append silently. Don't ask permission for each fragment. Mention what you added in passing ("adding that"), but don't interrupt the conversation with save dialogs.

Before every write: re-read the file from disk. The user may have edited, reordered, or deleted fragments between turns — preserve their changes. Never overwrite the file; only append (or, if the user asks, edit a specific fragment in place).

The user can say "cut the last one", "rewrite that one sharper", "merge those two" at any time. Treat those as first-class instructions.

提供编写高质量Agent Skill的指南,强调可预测性为核心。涵盖模型调用与用户调用的权衡、描述撰写原则(如去重、前置触发词)及信息层级结构(步骤与参考),旨在提升Skill的确定性与效率。
询问如何编写或优化Agent Skill 需要理解Skill的可预测性原则 纠结于模型调用与用户调用的选择 想要优化Skill的描述以触发特定分支 需要梳理Skill中的信息层级和步骤
.agents/skills/writing-great-skills/SKILL.md
npx skills add Remocn/remocn --skill writing-great-skills -g -y
SKILL.md
Frontmatter
{
    "name": "writing-great-skills",
    "description": "Reference for writing and editing skills well — the vocabulary and principles that make a skill predictable.",
    "disable-model-invocation": true
}

A skill exists to wrangle determinism out of a stochastic system. Predictability — the agent taking the same process every run, not producing the same output — is the root virtue; every lever below serves it.

Bold terms are defined in GLOSSARY.md; look them up there for the full meaning.

Invocation

Two choices, trading different costs:

  • A model-invoked skill keeps a description, so the agent can fire it autonomously and other skills can reach it (you can still type its name too). It contributes to context load — the description sits in the window every turn. Mechanics: omit disable-model-invocation, and write a model-facing description with rich trigger phrasing ("Use when the user wants…, mentions…").
  • A user-invoked skill strips the description from the agent's reach: only you, typing its name, can invoke it — and no other skill can. Zero context load, but it spends cognitive load: you are the index that must remember it exists. Mechanics: set disable-model-invocation: true; the description becomes human-facing — a one-line summary, trigger lists stripped.

Pick model-invocation only when the agent must reach the skill on its own, or another skill must. If it only ever fires by hand, make it user-invoked and pay no context load.

When user-invoked skills multiply past what you can remember, that piled-up cognitive load is cured by a router skill: one user-invoked skill that names the others and when to reach for each.

Writing the description

A model-invoked description does two jobs — state what the skill is, and list the branches that should trigger it. Every word increases context load, so a description earns even harder pruning than the body:

  • Front-load the skill's leading word — the description is where it does its invocation work.
  • One trigger per branch. Synonyms that rename a single branch are duplication — "build features using TDD … asks for test-first development" is one branch written twice. Collapse them; keep only genuinely distinct branches.
  • Cut identity that's already in the body. Keep the description to triggers, plus any "when another skill needs…" reach clause.

Information hierarchy

A skill is built from two content types — steps and reference — that mix freely: a skill can be all steps, all reference, or both. The core decision is which to use and where each sits on the information hierarchy, a ladder ranked by how immediately the agent needs the material:

  1. In-skill step — an ordered action in SKILL.md, the primary tier: what the agent does, in order. Each step ends on a completion criterion, the condition that tells the agent the work is done. Make it checkable (can the agent tell done from not-done?) and, where it matters, exhaustive ("every modified model accounted for", not "produce a change list") — a vague criterion invites premature completion.
  2. In-skill reference — a definition, rule, or fact in SKILL.md, consulted on demand. Often a legitimately flat peer-set (every rule of a review on one rung) — a fine arrangement, not a smell. This skill is all reference.
  3. External reference — reference pushed out of SKILL.md into a separate file, reached by a context pointer, loaded only when the pointer fires. (Spans disclosed reference — a sibling file like GLOSSARY.md, still part of the skill — through fully external reference that lives outside the skill system and any skill can point at.)

A demanding completion criterion drives thorough legwork — the digging the agent does within the work — whether the skill has steps or not, since "every rule applied" binds flat reference just as "every step done" binds a sequence.

Push too little down and the top bloats; push too much and you hide material the agent actually needs. That tension is the whole decision.

Progressive disclosure is the move down the ladder — out of SKILL.md into a linked file — so the top stays legible. Mechanics: a linked .md file in the skill folder, named for what it holds (this skill discloses its full definitions to GLOSSARY.md). Some skills are used in more than one way, and each distinct way is a branch — different runs taking different paths through the skill. Branching is the cleanest disclosure test: inline what every branch needs, and push behind a pointer what only some branches reach. A context pointer's wording, not its target, decides when and how reliably the agent reaches the material.

Where the ladder decides how far down a piece sits, co-location decides what sits beside it once there: keep a concept's definition, rules, and caveats under one heading rather than scattered, so reading one part brings its neighbours with it.

When to split

Granularity is how finely you divide skills, and each cut spends one of the two loads, so split only when the cut earns it. Two cuts:

  • By invocation — split off a model-invoked skill when you have a distinct leading word that should trigger it on its own, or another skill must reach it. You pay context load for the new always-loaded description, so that independent reach has to be worth it.
  • By sequence — split a run of steps when the steps still ahead (a step's post-completion steps) tempt the agent to rush the one in front of it (premature completion). Keeping them out of view encourages the agent to do more legwork on the current task.

Pruning

Keep each meaning in a single source of truth: one authoritative place, so changing the behaviour is a one-place edit.

Check every line for relevance: does it still bear on what the skill does?

Then hunt no-ops sentence by sentence, not just line by line: run the no-op test on each sentence in isolation, and when one fails, delete the whole sentence rather than trim words from it. Be aggressive — most prose that fails should go, not be rewritten.

Leading words

A leading word is a compact concept already living in the model's pretraining that the agent thinks with while running the skill (e.g. lesson, fog of war, tracer bullets). Repeated throughout the text (though not necessarily - a strong leading word might only be needed once), it accumulates a distributed definition and anchors a whole region of behaviour in the fewest tokens, by recruiting priors the model already holds.

It serves predictability twice. In the body it anchors execution: the agent reaches for the same behaviour every time the word appears. In the description it anchors invocation: when the same word lives in your prompts, docs, and code, the agent links that shared language to the skill and fires it more reliably.

Hunt for opportunities to refactor skills to use leading words. A triad spelled out at three sites (duplication), a description spending a sentence to gesture at one idea — each is a passage begging to collapse into a single token. Examples include:

  • "fast, deterministic, low-overhead" -> tight — one quality restated across a phase — into a single pretrained word (a tight loop).
  • "a loop you believe in" -> red — converts a fuzzy gate into a binary observable state (the loop goes red on the bug, or it doesn't).

You win twice over: fewer tokens, and a sharper hook for the agent to hang its thinking on. Assume every skill is carrying restatements that leading words retire — go find them.

Failure modes

Use these to diagnose issues the user may be having with the skill.

  • Premature completion — ending a step before it's genuinely done, attention slipping to being done. Defence, in order: sharpen the completion criterion first (cheap, local); only if it is irreducibly fuzzy and you observe the rush, hide the post-completion steps by splitting (the sequence cut).
  • Duplication — the same meaning in more than one place. Costs maintenance and tokens, and inflates a meaning's prominence on the ladder past its real rank.
  • Sediment — stale layers that settle because adding feels safe and removing feels risky. The default fate of any skill without a pruning discipline.
  • Sprawl — a skill simply too long, even when every line is live and unique. Hurts readability and maintainability and wastes tokens. The cure is the ladder: disclose reference behind pointers, and split by branch or sequence so each path carries only what it needs.
  • No-op — a line the model already obeys by default, so you pay load to say nothing. The test: does it change behaviour versus the default? A weak leading word (be thorough when the agent is already thorough-ish) is a no-op; the fix is a stronger word (relentless), not a different technique.
  • Negation — steering by prohibition backfires: don't think of an elephant names the elephant and makes it more available, not less. Prompt the positive — state the target behaviour so the banned one is never spoken; keep a prohibition only as a hard guardrail you can't phrase positively, and even then pair it with what to do instead.
将原始素材转化为结构严谨的文章。通过确立读者前置知识、提供多个开篇选项供选择,并逐段构建内容,确保概念逻辑自洽且逐步铺垫。实时保存草稿,直至文章完成。
用户提供了包含原始素材的 Markdown 文件 需要将零散片段或非结构化文本整理成正式文章
.agents/skills/writing-shape/SKILL.md
npx skills add Remocn/remocn --skill writing-shape -g -y
SKILL.md
Frontmatter
{
    "name": "writing-shape",
    "description": "Writing, exploit — shape raw material into an article, paragraph by paragraph.",
    "disable-model-invocation": true
}

The user has passed (or will pass) a markdown file of raw material. Treat it as the input pile — anything from a tidy list of fragments to a wall of unstructured prose to a transcript. The format does not matter. Read it end-to-end before doing anything else.

Then run a shaping session that produces a separate article document. This is exploit: the exploring is done, the pile is fixed — commit to a structure and mine the pile to fill it. Do not edit the raw material file — it is read-only to this skill.

If the user did not say where to save the article, ask once and remember the path.

The loop

  1. Read the pile. Read the input file in full. Form a sense of what's in it.
  2. Establish the prerequisites. Settle with the user what the reader knows walking in — the concepts that are grounded from the start. Everything else must be grounded by a block before a later block can lean on it. See Grounding.
  3. Draft 2–3 candidate openings. Each opening should imply a different thesis or angle for the article. Show all of them. Force the user to pick or compose a hybrid. The chosen opening defines what the rest of the article must do.
  4. Grow paragraph by paragraph. After the opening lands, ask "given this opening, what does the reader need to hear next?" Pull material from the pile to answer. The next block may only lean on grounded concepts, and grounds new ones as it lands. Argue about the form the next block takes — a paragraph, a list, a table, a callout, a quote, a code block. Each format choice should be deliberate and defensible.
  5. Append to the article file as you go. Don't batch. Write each agreed paragraph or block immediately so the user can see the article taking shape.
  6. Loop step 4 until the article is done. The user decides when it's done.

Grounding

Every concept has to be grounded before a block can lean on it: the reader either walked in knowing it or met it in an earlier block. A block that reaches for an ungrounded concept loses the reader. The unit is the concept, not the word for it — a block can lean on an idea the reader lacks even with no jargon in sight. Where a concept has a name — a term — grounding it means landing the idea and the term together.

A concept gets grounded one of two ways:

  • Prerequisite — grounded before the opening. The reader brings it. Fixed at the start.
  • Introduced — a block establishes it, and from then on it's grounded for the rest of the article.

Keep a running list of what's grounded. When you ask "what does the reader need to hear next?", an ungrounded concept the next move needs is itself the answer: ground it first — here or in an earlier block — or you can't make the move. This is the gap-naming of Pulling from the pile one level up: there the pile is missing material; here the article is missing a foundation.

The lever is what you make a prerequisite versus what you ground inside the article. Demand too much up front and you shut readers out; ground too much inside and the opening drowns in definitions. Settle it with the user when you establish prerequisites.

Conversational feel

This is a grilling session inverted. In ideation, the question was "what are you actually noticing?" Here it's "what is this article actually arguing, and in what order does the reader need to hear it?" Push back. Refuse to let weak transitions slide. If a paragraph doesn't earn its place, cut it.

Specific moves to keep using:

  • "What does this paragraph do for the reader that the previous one didn't?"
  • "If I cut this, what breaks?"
  • "Is this prose, or should it be a list? Why prose?"
  • "This sentence is doing two jobs — split it or pick one."
  • "The opening promised X. We've drifted to Y. Either re-thread it or change the opening."

Pulling from the pile

Treat the raw material as a quarry, not a script. Pull a fragment, rework it to fit the surrounding paragraph, and place it. A fragment may be split across multiple paragraphs, merged with another, or paraphrased. The pile's job is to be mined; the article's job is to read as one voice.

If the pile lacks something the article needs, name the gap explicitly: "We need an example here and the pile doesn't have one — give me one now or we cut this section."

Format arguments to actually have

When choosing how to render a block, weigh these tradeoffs out loud with the user, not silently:

  • Prose vs. list. Prose carries argument; lists carry parallel items. If items aren't truly parallel, prose is better. If they are, a list is faster to scan.
  • Inline vs. callout. Tips, warnings, and asides go in callouts (> [!TIP], > [!NOTE]) — but only if they'd genuinely derail the main argument inline. Otherwise leave them inline.
  • Table vs. repeated structure. If the same shape repeats 3+ times with the same fields, a table. Otherwise prose with bold leads.
  • Quote vs. paraphrase. Quote when the original wording is the point. Paraphrase when only the idea matters.
  • Code block vs. inline code. Multi-line, runnable, or illustrative → block. Single token or identifier → inline.

Writing rhythm

Append to the article file as each block is agreed. Re-read the file from disk before every write — the user may have edited between turns. Never overwrite blindly. If the user wants a paragraph rewritten, edit that specific paragraph in place; leave the rest alone.

Out of scope

  • Mining for new fragments that aren't in the pile (handle gaps as in "Pulling from the pile").
  • Editing the raw material file.
  • Publishing, formatting for a specific platform, or adding frontmatter the user didn't ask for.
提供Remotion动画最佳实践,确保动画对Agent友好且支持Studio Visual Mode编辑。推荐优先使用interpolate()而非独立spring(),采用独立的CSS transform属性,并将可编辑值保持内联,避免隐藏或条件渲染导致无法编辑。
创建或审查Remotion动画时 需要动画在Remotion Studio Visual Mode中可编辑时
.claude/skills/interactivity-best-practices/SKILL.md
npx skills add Remocn/remocn --skill interactivity-best-practices -g -y
SKILL.md
Frontmatter
{
    "name": "interactivity-best-practices",
    "description": "Best practices for writing Remotion animations that stay intuitive for agents and editable in Remotion Studio Visual Mode."
}

Interactivity Best Practices

Use these guidelines when creating or reviewing Remotion animations, especially if the animation should be editable in Remotion Studio Visual Mode.

Prefer interpolate() over standalone spring()

Prefer interpolate() for most animation values.

  • It is easier for humans and agents to reason about.
  • Bezier easings are familiar from CSS and can express snappy or jumpy motion.
  • Studio Visual Mode can edit interpolate() keyframes.

When an animation should feel like a spring, keep the editable value in interpolate() and pass Easing.spring() as the easing function.

Prefer:

style={{
  scale: interpolate(frame, [0, 30], [0, 1], {
    easing: Easing.spring({
      damping: 200,
    }),
  }),
}}

❌ Avoid using spring() as a separate driver when the same motion can be expressed as interpolate() easing:

const scale = spring({
  frame,
  fps,
  config: {
    damping: 200,
  },
});

style={{
  scale,
}}

Easing.spring() supports damping, mass, stiffness, and overshootClamping. It is normalized to the interpolation progress, so it does not take frame, fps, from, to, delay, reverse, durationInFrames, or durationRestThreshold.

Use standalone spring() only when the animation specifically needs a frame-driven physical spring simulation that cannot be represented as an easing on interpolate().

Prefer individual CSS transform properties

Use individual CSS transform properties such as scale, rotate, and translate instead of composing a transform string.

Prefer:

style={{
  scale: interpolate(frame, [0, 100], [0, 2]),
}}

❌ Avoid:

style={{
  transform: `scale(${interpolate(frame, [0, 100], [0, 2])})`,
}}

Individual transform properties are editable in Studio Visual Mode. Values hidden inside a transform string are not.

Keep editable values inline

Put the interpolation directly in the JSX style object when the value should be visually editable.

Prefer:

style={{
  scale: interpolate(frame, [0, 100], [0, 2]),
}}

❌ Avoid:

const scale = interpolate(frame, [0, 100], [0, 2]);

style={{
  scale,
}}

Inline computations and literal values let Studio Visual Mode discover and edit the keyframes and props.

This also applies to effect parameters. Keep editable effect values inline in the effect call.

Prefer:

effects={[
  radialProgressiveBlur({
    center: [0.5, 0.5],
    point1: [0.86, 0.36],
    point2: [0.68, 0.84],
  }),
]}

❌ Avoid hiding editable values behind constants:

const center = [0.5, 0.5] as const;

effects={[
  radialProgressiveBlur({
    center,
  }),
]}

Keep effects unconditional

When using the effects prop, keep the effect array shape unconditional. Studio Visual Mode cannot reliably edit an effect that only exists behind a conditional expression.

Prefer rendering separate elements when one version should have effects and another should not:

<CanvasImage src={src} width={1280} height={720} />
<CanvasImage
  src={src}
  width={1280}
  height={720}
  effects={[
    blur({
      radius: interpolate(frame, [0, 100], [0, 40]),
    }),
  ]}
/>

❌ Avoid conditionally including an effect:

<CanvasImage
  src={src}
  width={1280}
  height={720}
  effects={enabled ? [blur({radius: 40})] : []}
/>

Keep editable effect parameters inline inside the unconditional effect call. Do not pass variables for editable values such as coordinates, colors, numeric controls, or interpolations.

Interpolate rotation and translation directly

Interpolate CSS unit strings directly for rotate and translate.

Prefer:

style={{
  rotate: interpolate(frame, [0, 100], ["20deg", "90deg"]),
  translate: interpolate(frame, [0, 100], ["0px 0px", "100px 100px"]),
}}

❌ Avoid manually building strings around separately interpolated numbers when the property can be interpolated directly.

Direct interpolation of these properties is supported and works better with visual editing in Studio.

Use Interactive.* for tweakable elements

Use the Interactive namespace from remotion when an element is likely to be tweaked in Studio.

import {Interactive} from "remotion";

For example:

<Interactive.Div
  style={{
    color: "red",
    fontSize: 80,
  }}
>
  Hello
</Interactive.Div>

<Interactive.Div>, <Interactive.Span>, and the other Interactive.* components behave like their regular HTML equivalents, but enable interactivity in Studio.

Inline styles on these elements, such as text color and font size, can be standardized interactively.

智能路由助手,引导用户根据场景选择技能。核心流程涵盖从构思到交付的访谈、原型验证、需求拆分及TDD实现;支持多会话构建与代码审查;提供问题分流入口,确保上下文连贯性。
不确定该使用哪个技能或工作流时 需要将想法转化为可执行任务时 需要整理积压的Bug或需求时
agent/skills/ask-matt/SKILL.md
npx skills add Remocn/remocn --skill ask-matt -g -y
SKILL.md
Frontmatter
{
    "name": "ask-matt",
    "description": "Ask which skill or flow fits your situation. A router over the skills in this repo."
}

Ask Matt

You don't remember every skill, so ask.

A flow is a path through the skills. Most paths run along one main flow, and two on-ramps merge onto it. Everything else is standalone, or a vocabulary layer that runs underneath.

The main flow: idea → ship

The route most work travels. You have an idea and want it built.

  1. /grill-with-docs — sharpen the idea by interview. Start here when you have a codebase: it's stateful, retaining what it learns in CONTEXT.md and ADRs. (No codebase? Use /grill-me — see Standalone. Both run the same /grilling primitive; grill-with-docs is the one that leaves a paper trail.)

  2. Branch — can you settle every question in conversation? If a question needs a runnable answer (state, business logic, a UI you have to see), detour through a prototype, bridged by /handoff in both directions (see Crossing sessions):

    • /handoff out, then open a fresh session against that file,
    • /prototype to answer the question with throwaway code,
    • /handoff back what you learned, and reference it from the original idea thread.
  3. Branch — is this a multi-session build?

    • Yes/to-spec (turn the thread into a spec), then /to-tickets to split it into tracer-bullet tickets, each declaring its blocking edges. On a local tracker that's an ordered tickets.md you work by hand; on a real tracker the edges become native blocking links, so any ticket whose blockers are done can be grabbed — kick off /implement per ticket, clearing context between each one.
    • No/implement right here, in the same context window.

    Either way, /implement builds each issue by driving /tdd internally — one red-green slice at a time — then closes out by running /code-review, a two-axis review (Standards + Spec) of the diff, before committing. Reach for /tdd on its own when you just want to build a concrete behaviour test-first without a full spec, and /code-review on its own whenever you want to review a branch or PR against a fixed point.

Context hygiene

Keep steps 1–3 in one unbroken context window — don't compact or clear until after /to-tickets — so the grilling, spec, and tickets all build on the same thinking. Each /implement then starts fresh, working from the ticket.

The limit on this is the smart zone: the window (~120k tokens on state-of-the-art models) within which the model still reasons sharply. If a session approaches it before /to-tickets, don't push on degraded — /handoff and continue in a fresh thread.

On-ramps

A starting situation that generates work, then merges onto the main flow.

  • Bugs and requests piling up/triage. It moves issues through triage roles and produces agent-ready issues, which /implement later picks up.

    Triage is only for issues you didn't create — bug reports, incoming feature requests, anything that arrives raw. Tickets that /to-tickets produced are already agent-ready, so don't triage them.

  • Something's broken/diagnosing-bugs. For the hard ones: the bug that resists a first glance, the intermittent flake, the regression that crept in between two known-good states. It refuses to theorise until it has a tight feedback loop — one command that already goes red on this bug — then fixes with a regression test. Its post-mortem hands off to /improve-codebase-architecture when the real finding is that there's no good seam to lock the bug down.

  • A huge, foggy effort — a greenfield project or a huge feature build, too big for one session/wayfinder. When the way from here to the destination isn't visible yet, it charts a shared map of investigation tickets on the issue tracker and resolves them one at a time — producing decisions, not deliverables — until the fog is pushed back and the way is clear. Then it merges onto the main flow at /to-spec (or, if the effort turned out small enough, straight to /implement). Where /grill-with-docs sharpens an idea you can hold in one session, wayfinder is for the idea you can't.

Codebase health

Not feature work — upkeep.

  • /improve-codebase-architecture — run whenever you have a spare moment to keep the codebase good for agents to operate in. It surfaces deepening opportunities; picking one generates an idea you can take into the main flow at /grill-with-docs. It's the survey that finds the candidates; /codebase-design (below) is the bench you design the chosen one on.

Vocabulary underneath

Two model-invoked references that run beneath the other skills — each the single source of truth for its vocabulary. Reach for them directly when the words, not the process, are the problem; or let the skills above pull them in.

  • /domain-modeling — sharpen the project's domain language: challenge a fuzzy term, resolve an overloaded word ("account" doing three jobs), record a hard-to-reverse decision as an ADR. It's the active discipline /grill-with-docs drives to keep CONTEXT.md a clean glossary.
  • /codebase-design — the deep-module vocabulary (module, interface, depth, seam, adapter, leverage, locality) for designing a module's shape: a lot of behaviour behind a small interface at a clean seam. /tdd and /improve-codebase-architecture both speak it.

Crossing sessions

  • /handoff — when a thread is full or you need to branch off (e.g. into a /prototype session), this compacts the conversation into a markdown file. You don't continue in place — you open a new session and reference that file to carry the context across. It's the bridge between context windows, in either direction. Use it when you want a fresh session but need the current conversation preserved.
  • /compact (built-in) — stay in the same conversation, letting the earlier turns be summarized. Use it at intentional breaks between phases, when you don't mind losing the verbatim history. Don't compact mid-phase — the agent can lose its way. /handoff forks; /compact continues.

Standalone

Off the main flow entirely.

  • /grill-me — the same relentless interview as /grill-with-docs, but for when you have no codebase. Stateless: it saves nothing locally, builds no CONTEXT.md. Reach for it to sharpen any plan or design that doesn't live in a repo.
  • /prototype — a small, throwaway program that answers one design question: does this state model feel right, or what should this UI look like. Throwaway from day one — keep the answer, delete the code. It's the detour in step 2 of the main flow, but reach for it any time a design question is hard to settle on paper.
  • /research — delegate reading legwork to a background agent: it investigates a question against primary sources, then leaves a cited Markdown file in the repo. Keep working while it reads. The file it produces is something to take into the main flow at /grill-with-docs — research feeds the thinking, it doesn't replace it.
  • /teach — learn a concept over multiple sessions, using the current directory as a stateful workspace.
  • /writing-great-skills — reference for writing and editing skills well.

Precondition

/setup-matt-pocock-skills — run before your first engineering flow to configure the issue tracker, triage labels, and doc layout the other skills assume. Custom issue trackers also work.

将当前对话交接给后台新 Agent。生成包含建议技能、敏感信息脱敏及外部资源引用的摘要,并通过 claude --bg 命令启动新会话,实现无缝工作延续。
用户希望中断当前任务并交由后台代理继续处理 需要为新的 Agent 上下文创建结构化摘要
agent/skills/claude-handoff/SKILL.md
npx skills add Remocn/remocn --skill claude-handoff -g -y
SKILL.md
Frontmatter
{
    "name": "claude-handoff",
    "description": "Hand the current conversation off to a fresh background agent that picks up the work immediately."
}

Write a handoff summary of the current conversation so a fresh agent can continue the work. Instead of saving it, launch a background agent seeded with the summary as its prompt: claude --bg --name "<descriptive name>" "<handoff summary>". It starts in the current working directory and returns immediately; the user manages it with claude agents.

Always pass -n/--name with a descriptive name (e.g. --name "Fix login bug") — it sets the display name shown in the job list, session picker, and terminal title.

Include a "suggested skills" section in the summary, which suggests skills that the agent should invoke.

Do not duplicate content already captured in other artifacts (PRDs, plans, ADRs, issues, commits, diffs). Reference them by path or URL instead.

Redact any sensitive information, such as API keys, passwords, or personally identifiable information — the summary becomes the agent's prompt.

If the user passed arguments, treat them as a description of what the next session will focus on and tailor the summary accordingly.

对代码变更进行双维度并行审查:标准合规性与需求实现度。通过对比固定点与HEAD的差异,结合仓库规范及Fowler代码异味基线,生成并排报告。
用户要求审查分支或PR 用户请求自某提交/标签以来的变更审查
agent/skills/code-review/SKILL.md
npx skills add Remocn/remocn --skill code-review -g -y
SKILL.md
Frontmatter
{
    "name": "code-review",
    "description": "Review the changes since a fixed point (commit, branch, tag, or merge-base) along two axes — Standards (does the code follow this repo's documented coding standards?) and Spec (does the code match what the originating issue\/PRD asked for?). Runs both reviews in parallel sub-agents and reports them side by side. Use when the user wants to review a branch, a PR, work-in-progress changes, or asks to \"review since X\"."
}

Two-axis review of the diff between HEAD and a fixed point the user supplies:

  • Standards — does the code conform to this repo's documented coding standards?
  • Spec — does the code faithfully implement the originating issue / PRD / spec?

Both axes run as parallel sub-agents so they don't pollute each other's context, then this skill aggregates their findings.

The issue tracker should have been provided to you — run /setup-matt-pocock-skills if docs/agents/issue-tracker.md is missing.

Process

1. Pin the fixed point

Whatever the user said is the fixed point — a commit SHA, branch name, tag, main, HEAD~5, etc. If they didn't specify one, ask for it.

Capture the diff command once: git diff <fixed-point>...HEAD (three-dot, so the comparison is against the merge-base). Also note the list of commits via git log <fixed-point>..HEAD --oneline.

Before going further, confirm the fixed point resolves (git rev-parse <fixed-point>) and the diff is non-empty. A bad ref or empty diff should fail here — not inside two parallel sub-agents.

2. Identify the spec source

Look for the originating spec, in this order:

  1. Issue references in the commit messages (#123, Closes #45, GitLab !67, etc.) — fetch via the workflow in docs/agents/issue-tracker.md.
  2. A path the user passed as an argument.
  3. A PRD/spec file under docs/, specs/, or .scratch/ matching the branch name or feature.
  4. If nothing is found, ask the user where the spec is. If they say there isn't one, the Spec sub-agent will skip and report "no spec available".

3. Identify the standards sources

Anything in the repo that documents how code should be written, such as CODING_STANDARDS.md or CONTRIBUTING.md.

On top of whatever the repo documents, the Standards axis always carries the smell baseline below — a fixed set of Fowler code smells (Refactoring, ch.3) that applies even when a repo documents nothing. Two rules bind it:

  • The repo overrides. A documented repo standard always wins; where it endorses something the baseline would flag, suppress the smell.
  • Always a judgement call. Each smell is a labelled heuristic ("possible Feature Envy"), never a hard violation — and, like any standard here, skip anything tooling already enforces.

Each smell reads what it ishow to fix; match it against the diff:

  • Mysterious Name — a function, variable, or type whose name doesn't reveal what it does or holds. → rename it; if no honest name comes, the design's murky.
  • Duplicated Code — the same logic shape appears in more than one hunk or file in the change. → extract the shared shape, call it from both.
  • Feature Envy — a method that reaches into another object's data more than its own. → move the method onto the data it envies.
  • Data Clumps — the same few fields or params keep travelling together (a type wanting to be born). → bundle them into one type, pass that.
  • Primitive Obsession — a primitive or string standing in for a domain concept that deserves its own type. → give the concept its own small type.
  • Repeated Switches — the same switch/if-cascade on the same type recurs across the change. → replace with polymorphism, or one map both sites share.
  • Shotgun Surgery — one logical change forces scattered edits across many files in the diff. → gather what changes together into one module.
  • Divergent Change — one file or module is edited for several unrelated reasons. → split so each module changes for one reason.
  • Speculative Generality — abstraction, parameters, or hooks added for needs the spec doesn't have. → delete it; inline back until a real need shows.
  • Message Chains — long a.b().c().d() navigation the caller shouldn't depend on. → hide the walk behind one method on the first object.
  • Middle Man — a class or function that mostly just delegates onward. → cut it, call the real target direct.
  • Refused Bequest — a subclass or implementer that ignores or overrides most of what it inherits. → drop the inheritance, use composition.

4. Spawn both sub-agents in parallel

Send a single message with two Agent tool calls. Use the general-purpose subagent for both.

Standards sub-agent prompt — include:

  • The full diff command and commit list.
  • The list of standards-source files you found in step 3, plus the smell baseline from step 3 pasted in full — the sub-agent has no other access to it.
  • The brief: "Report — per file/hunk where relevant — (a) every place the diff violates a documented standard: cite the standard (file + the rule); and (b) any baseline smell you spot: name it and quote the hunk. Distinguish hard violations from judgement calls — documented-standard breaches can be hard, but baseline smells are always judgement calls, and a documented repo standard overrides the baseline. Skip anything tooling enforces. Under 400 words."

Spec sub-agent prompt — include:

  • The diff command and commit list.
  • The path or fetched contents of the spec.
  • The brief: "Report: (a) requirements the spec asked for that are missing or partial; (b) behaviour in the diff that wasn't asked for (scope creep); (c) requirements that look implemented but where the implementation looks wrong. Quote the spec line for each finding. Under 400 words."

If the spec is missing, skip the Spec sub-agent and note this in the final report.

5. Aggregate

Present the two reports under ## Standards and ## Spec headings, verbatim or lightly cleaned. Do not merge or rerank findings — the two axes are deliberately separate (see Why two axes).

End with a one-line summary: total findings per axis, and the worst issue within each axis (if any). Don't pick a single winner across axes — that's the reranking the separation exists to prevent.

Why two axes

A change can pass one axis and fail the other:

  • Code that follows every standard but implements the wrong thing → Standards pass, Spec fail.
  • Code that does exactly what the issue asked but breaks the project's conventions → Spec pass, Standards fail.

Reporting them separately stops one axis from masking the other.

提供设计深层模块的统一词汇与原则,旨在通过小接口封装复杂实现,提升代码杠杆率、维护局部性及可测试性。适用于模块接口设计、重构、寻找深化机会及确定模块边界等场景。
设计或改进模块接口 寻找代码深化机会 决定模块边界位置 提高代码可测试性或AI导航能力
agent/skills/codebase-design/SKILL.md
npx skills add Remocn/remocn --skill codebase-design -g -y
SKILL.md
Frontmatter
{
    "name": "codebase-design",
    "description": "Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary."
}

Codebase Design

Design deep modules: a lot of behaviour behind a small interface, placed at a clean seam, testable through that interface. Use this language and these principles wherever code is being designed or restructured. The aim is leverage for callers, locality for maintainers, and testability for everyone.

Glossary

Use these terms exactly — don't substitute "component," "service," "API," or "boundary." Consistent language is the whole point.

Module — anything with an interface and an implementation. Deliberately scale-agnostic: a function, class, package, or tier-spanning slice. Avoid: unit, component, service.

Interface — everything a caller must know to use the module correctly: the type signature, but also invariants, ordering constraints, error modes, required configuration, and performance characteristics. Avoid: API, signature (too narrow — they refer only to the type-level surface).

Implementation — what's inside a module, its body of code. Distinct from Adapter: a thing can be a small adapter with a large implementation (a Postgres repo) or a large adapter with a small implementation (an in-memory fake). Reach for "adapter" when the seam is the topic; "implementation" otherwise.

Depth — leverage at the interface: the amount of behaviour a caller (or test) can exercise per unit of interface they have to learn. A module is deep when a large amount of behaviour sits behind a small interface, shallow when the interface is nearly as complex as the implementation.

Seam (Michael Feathers) — a place where you can alter behaviour without editing in that place; the location at which a module's interface lives. Where to put the seam is its own design decision, distinct from what goes behind it. Avoid: boundary (overloaded with DDD's bounded context).

Adapter — a concrete thing that satisfies an interface at a seam. Describes role (what slot it fills), not substance (what's inside).

Leverage — what callers get from depth: more capability per unit of interface they learn. One implementation pays back across N call sites and M tests.

Locality — what maintainers get from depth: change, bugs, knowledge, and verification concentrate in one place rather than spreading across callers. Fix once, fixed everywhere.

Deep vs shallow

Deep module = small interface + lots of implementation:

┌─────────────────────┐
│   Small Interface   │  ← Few methods, simple params
├─────────────────────┤
│                     │
│  Deep Implementation│  ← Complex logic hidden
│                     │
└─────────────────────┘

Shallow module = large interface + little implementation (avoid):

┌─────────────────────────────────┐
│       Large Interface           │  ← Many methods, complex params
├─────────────────────────────────┤
│  Thin Implementation            │  ← Just passes through
└─────────────────────────────────┘

When designing an interface, ask:

  • Can I reduce the number of methods?
  • Can I simplify the parameters?
  • Can I hide more complexity inside?

Principles

  • Depth is a property of the interface, not the implementation. A deep module can be internally composed of small, mockable, swappable parts — they just aren't part of the interface. A module can have internal seams (private to its implementation, used by its own tests) as well as the external seam at its interface.
  • The deletion test. Imagine deleting the module. If complexity vanishes, it was a pass-through. If complexity reappears across N callers, it was earning its keep.
  • The interface is the test surface. Callers and tests cross the same seam. If you want to test past the interface, the module is probably the wrong shape.
  • One adapter means a hypothetical seam. Two adapters means a real one. Don't introduce a seam unless something actually varies across it.

Designing for testability

Good interfaces make testing natural:

  1. Accept dependencies, don't create them.

    // Testable
    function processOrder(order, paymentGateway) {}
    
    // Hard to test
    function processOrder(order) {
      const gateway = new StripeGateway();
    }
    
  2. Return results, don't produce side effects.

    // Testable
    function calculateDiscount(cart): Discount {}
    
    // Hard to test
    function applyDiscount(cart): void {
      cart.total -= discount;
    }
    
  3. Small surface area. Fewer methods = fewer tests needed. Fewer params = simpler test setup.

Relationships

  • A Module has exactly one Interface (the surface it presents to callers and tests).
  • Depth is a property of a Module, measured against its Interface.
  • A Seam is where a Module's Interface lives.
  • An Adapter sits at a Seam and satisfies the Interface.
  • Depth produces Leverage for callers and Locality for maintainers.

Rejected framings

  • Depth as ratio of implementation-lines to interface-lines (Ousterhout): rewards padding the implementation. We use depth-as-leverage instead.
  • "Interface" as the TypeScript interface keyword or a class's public methods: too narrow — interface here includes every fact a caller must know.
  • "Boundary": overloaded with DDD's bounded context. Say seam or interface.

Going deeper

  • Deepening a cluster given its dependencies — see DEEPENING.md: dependency categories, seam discipline, and replace-don't-layer testing.
  • Exploring alternative interfaces — see DESIGN-IT-TWICE.md: spin up parallel sub-agents to design the interface several radically different ways, then compare on depth, locality, and seam placement.
基于“设计两次”理念,通过并行子代理生成多个截然不同的接口设计方案。涵盖需求收集、多视角设计生成、对比分析及综合优化,旨在探索API或模块的最佳接口形态,避免单一思路局限。
用户希望为模块设计API 用户想探索不同的接口选项 用户需要比较模块的形状 用户提到“设计两次”
agent/skills/design-an-interface/SKILL.md
npx skills add Remocn/remocn --skill design-an-interface -g -y
SKILL.md
Frontmatter
{
    "name": "design-an-interface",
    "description": "Generate multiple radically different interface designs for a module using parallel sub-agents. Use when user wants to design an API, explore interface options, compare module shapes, or mentions \"design it twice\"."
}

Design an Interface

Based on "Design It Twice" from "A Philosophy of Software Design": your first idea is unlikely to be the best. Generate multiple radically different designs, then compare.

Workflow

1. Gather Requirements

Before designing, understand:

  • What problem does this module solve?
  • Who are the callers? (other modules, external users, tests)
  • What are the key operations?
  • Any constraints? (performance, compatibility, existing patterns)
  • What should be hidden inside vs exposed?

Ask: "What does this module need to do? Who will use it?"

2. Generate Designs (Parallel Sub-Agents)

Spawn 3+ sub-agents simultaneously using Task tool. Each must produce a radically different approach.

Prompt template for each sub-agent:

Design an interface for: [module description]

Requirements: [gathered requirements]

Constraints for this design: [assign a different constraint to each agent]
- Agent 1: "Minimize method count - aim for 1-3 methods max"
- Agent 2: "Maximize flexibility - support many use cases"
- Agent 3: "Optimize for the most common case"
- Agent 4: "Take inspiration from [specific paradigm/library]"

Output format:
1. Interface signature (types/methods)
2. Usage example (how caller uses it)
3. What this design hides internally
4. Trade-offs of this approach

3. Present Designs

Show each design with:

  1. Interface signature - types, methods, params
  2. Usage examples - how callers actually use it in practice
  3. What it hides - complexity kept internal

Present designs sequentially so user can absorb each approach before comparison.

4. Compare Designs

After showing all designs, compare them on:

  • Interface simplicity: fewer methods, simpler params
  • General-purpose vs specialized: flexibility vs focus
  • Implementation efficiency: does shape allow efficient internals?
  • Depth: small interface hiding significant complexity (good) vs large interface with thin implementation (bad)
  • Ease of correct use vs ease of misuse

Discuss trade-offs in prose, not tables. Highlight where designs diverge most.

5. Synthesize

Often the best design combines insights from multiple options. Ask:

  • "Which design best fits your primary use case?"
  • "Any elements from other designs worth incorporating?"

Evaluation Criteria

From "A Philosophy of Software Design":

Interface simplicity: Fewer methods, simpler params = easier to learn and use correctly.

General-purpose: Can handle future use cases without changes. But beware over-generalization.

Implementation efficiency: Does interface shape allow efficient implementation? Or force awkward internals?

Depth: Small interface hiding significant complexity = deep module (good). Large interface with thin implementation = shallow module (avoid).

Anti-Patterns

  • Don't let sub-agents produce similar designs - enforce radical difference
  • Don't skip comparison - the value is in contrast
  • Don't implement - this is purely about interface shape
  • Don't evaluate based on implementation effort
针对难以复现的bug和性能回归的诊断技能。核心在于构建快速、确定的反馈循环(如测试、脚本、回放),通过二分法或模糊测试定位问题。适用于用户请求调试或报告系统故障、缓慢等场景。
用户说'diagnose'或'debug this' 报告功能损坏、报错、失败或运行缓慢
agent/skills/diagnosing-bugs/SKILL.md
npx skills add Remocn/remocn --skill diagnosing-bugs -g -y
SKILL.md
Frontmatter
{
    "name": "diagnosing-bugs",
    "description": "Diagnosis loop for hard bugs and performance regressions. Use when the user says \"diagnose\"\/\"debug this\", or reports something broken\/throwing\/failing\/slow."
}

Diagnosing Bugs

A discipline for hard bugs. Skip phases only when explicitly justified.

When exploring the codebase, read CONTEXT.md (if it exists) to get a clear mental model of the relevant modules, and check ADRs in the area you're touching.

Phase 1 — Build a feedback loop

This is the skill. Everything else is mechanical. If you have a tight pass/fail signal for the bug — one that goes red on this bug — you will find the cause; bisection, hypothesis-testing, and instrumentation all just consume it. If you don't have one, no amount of staring at code will save you.

Spend disproportionate effort here. Be aggressive. Be creative. Refuse to give up.

Ways to construct one — try them in roughly this order

  1. Failing test at whatever seam reaches the bug — unit, integration, e2e.
  2. Curl / HTTP script against a running dev server.
  3. CLI invocation with a fixture input, diffing stdout against a known-good snapshot.
  4. Headless browser script (Playwright / Puppeteer) — drives the UI, asserts on DOM/console/network.
  5. Replay a captured trace. Save a real network request / payload / event log to disk; replay it through the code path in isolation.
  6. Throwaway harness. Spin up a minimal subset of the system (one service, mocked deps) that exercises the bug code path with a single function call.
  7. Property / fuzz loop. If the bug is "sometimes wrong output", run 1000 random inputs and look for the failure mode.
  8. Bisection harness. If the bug appeared between two known states (commit, dataset, version), automate "boot at state X, check, repeat" so you can git bisect run it.
  9. Differential loop. Run the same input through old-version vs new-version (or two configs) and diff outputs.
  10. HITL bash script. Last resort. If a human must click, drive them with scripts/hitl-loop.template.sh so the loop is still structured. Captured output feeds back to you.

Build the right feedback loop, and the bug is 90% fixed.

Tighten the loop

Treat the loop as a product. Once you have a loop, tighten it:

  • Can I make it faster? (Cache setup, skip unrelated init, narrow the test scope.)
  • Can I make the signal sharper? (Assert on the specific symptom, not "didn't crash".)
  • Can I make it more deterministic? (Pin time, seed RNG, isolate filesystem, freeze network.)

A 30-second flaky loop is barely better than no loop; a 2-second deterministic one is tight — a debugging superpower.

Non-deterministic bugs

The goal is not a clean repro but a higher reproduction rate. Loop the trigger 100×, parallelise, add stress, narrow timing windows, inject sleeps. A 50%-flake bug is debuggable; 1% is not — keep raising the rate until it's debuggable.

When you genuinely cannot build a loop

Stop and say so explicitly. List what you tried. Ask the user for: (a) access to whatever environment reproduces it, (b) a captured artifact (HAR file, log dump, core dump, screen recording with timestamps), or (c) permission to add temporary production instrumentation. Do not proceed to hypothesise without a loop.

Completion criterion — a tight loop that goes red

Phase 1 is done when the loop is tight and red-capable: you can name one command — a script path, a test invocation, a curl — that you have already run at least once (paste the invocation and its output), and that is:

  • Red-capable — it drives the actual bug code path and asserts the user's exact symptom, so it can go red on this bug and green once fixed. Not "runs without erroring" — it must be able to catch this specific bug.
  • Deterministic — same verdict every run (flaky bugs: a pinned, high reproduction rate, per above).
  • Fast — seconds, not minutes.
  • Agent-runnable — you can run it unattended; a human in the loop only via scripts/hitl-loop.template.sh.

If you catch yourself reading code to build a theory before this command exists, stop — jumping straight to a hypothesis is the exact failure this skill prevents. No red-capable command, no Phase 2.

Phase 2 — Reproduce + minimise

Run the loop. Watch it go red — the bug appears.

Confirm:

  • The loop produces the failure mode the user described — not a different failure that happens to be nearby. Wrong bug = wrong fix.
  • The failure is reproducible across multiple runs (or, for non-deterministic bugs, reproducible at a high enough rate to debug against).
  • You have captured the exact symptom (error message, wrong output, slow timing) so later phases can verify the fix actually addresses it.

Minimise

Once it's red, shrink the repro to the smallest scenario that still goes red. Cut inputs, callers, config, data, and steps one at a time, re-running the loop after each cut — keep only what's load-bearing for the failure.

Why bother: a minimal repro shrinks the hypothesis space in Phase 3 (fewer moving parts left to suspect) and becomes the clean regression test in Phase 5.

Done when every remaining element is load-bearing — removing any one of them makes the loop go green.

Do not proceed until you have reproduced and minimised.

Phase 3 — Hypothesise

Generate 3–5 ranked hypotheses before testing any of them. Single-hypothesis generation anchors on the first plausible idea.

Each hypothesis must be falsifiable: state the prediction it makes.

Format: "If <X> is the cause, then <changing Y> will make the bug disappear / <changing Z> will make it worse."

If you cannot state the prediction, the hypothesis is a vibe — discard or sharpen it.

Show the ranked list to the user before testing. They often have domain knowledge that re-ranks instantly ("we just deployed a change to #3"), or know hypotheses they've already ruled out. Cheap checkpoint, big time saver. Don't block on it — proceed with your ranking if the user is AFK.

Phase 4 — Instrument

Each probe must map to a specific prediction from Phase 3. Change one variable at a time.

Tool preference:

  1. Debugger / REPL inspection if the env supports it. One breakpoint beats ten logs.
  2. Targeted logs at the boundaries that distinguish hypotheses.
  3. Never "log everything and grep".

Tag every debug log with a unique prefix, e.g. [DEBUG-a4f2]. Cleanup at the end becomes a single grep. Untagged logs survive; tagged logs die.

Perf branch. For performance regressions, logs are usually wrong. Instead: establish a baseline measurement (timing harness, performance.now(), profiler, query plan), then bisect. Measure first, fix second.

Phase 5 — Fix + regression test

Write the regression test before the fix — but only if there is a correct seam for it.

A correct seam is one where the test exercises the real bug pattern as it occurs at the call site. If the only available seam is too shallow (single-caller test when the bug needs multiple callers, unit test that can't replicate the chain that triggered the bug), a regression test there gives false confidence.

If no correct seam exists, that itself is the finding. Note it. The codebase architecture is preventing the bug from being locked down. Flag this for the next phase.

If a correct seam exists:

  1. Turn the minimised repro into a failing test at that seam.
  2. Watch it fail.
  3. Apply the fix.
  4. Watch it pass.
  5. Re-run the Phase 1 feedback loop against the original (un-minimised) scenario.

Phase 6 — Cleanup + post-mortem

Required before declaring done:

  • Original repro no longer reproduces (re-run the Phase 1 loop)
  • Regression test passes (or absence of seam is documented)
  • All [DEBUG-...] instrumentation removed (grep the prefix)
  • Throwaway prototypes deleted (or moved to a clearly-marked debug location)
  • The hypothesis that turned out correct is stated in the commit / PR message — so the next debugger learns

Then ask: what would have prevented this bug? If the answer involves architectural change (no good test seam, tangled callers, hidden coupling) hand off to the /improve-codebase-architecture skill with the specifics. Make the recommendation after the fix is in, not before — you have more information now than when you started.

主动构建和精炼项目领域模型,确立通用语言。用于定义术语、记录架构决策或维护上下文映射。通过挑战歧义、交叉引用代码及按需更新 CONTEXT.md 来确保领域概念精确一致。
用户希望明确领域术语或通用语言 需要记录架构决策 其他技能需要维护领域模型
agent/skills/domain-modeling/SKILL.md
npx skills add Remocn/remocn --skill domain-modeling -g -y
SKILL.md
Frontmatter
{
    "name": "domain-modeling",
    "description": "Build and sharpen a project's domain model. Use when the user wants to pin down domain terminology or a ubiquitous language, record an architectural decision, or when another skill needs to maintain the domain model."
}

Domain Modeling

Actively build and sharpen the project's domain model as you design. This is the active discipline — challenging terms, inventing edge-case scenarios, and writing the glossary and decisions down the moment they crystallise. (Merely reading CONTEXT.md for vocabulary is not this skill — that's a one-line habit any skill can do. This skill is for when you're changing the model, not just consuming it.)

File structure

Most repos have a single context:

/
├── CONTEXT.md
├── docs/
│   └── adr/
│       ├── 0001-event-sourced-orders.md
│       └── 0002-postgres-for-write-model.md
└── src/

If a CONTEXT-MAP.md exists at the root, the repo has multiple contexts. The map points to where each one lives:

/
├── CONTEXT-MAP.md
├── docs/
│   └── adr/                          ← system-wide decisions
├── src/
│   ├── ordering/
│   │   ├── CONTEXT.md
│   │   └── docs/adr/                 ← context-specific decisions
│   └── billing/
│       ├── CONTEXT.md
│       └── docs/adr/

Create files lazily — only when you have something to write. If no CONTEXT.md exists, create one when the first term is resolved. If no docs/adr/ exists, create it when the first ADR is needed.

During the session

Challenge against the glossary

When the user uses a term that conflicts with the existing language in CONTEXT.md, call it out immediately. "Your glossary defines 'cancellation' as X, but you seem to mean Y — which is it?"

Sharpen fuzzy language

When the user uses vague or overloaded terms, propose a precise canonical term. "You're saying 'account' — do you mean the Customer or the User? Those are different things."

Discuss concrete scenarios

When domain relationships are being discussed, stress-test them with specific scenarios. Invent scenarios that probe edge cases and force the user to be precise about the boundaries between concepts.

Cross-reference with code

When the user states how something works, check whether the code agrees. If you find a contradiction, surface it: "Your code cancels entire Orders, but you just said partial cancellation is possible — which is right?"

Update CONTEXT.md inline

When a term is resolved, update CONTEXT.md right there. Don't batch these up — capture them as they happen. Use the format in CONTEXT-FORMAT.md.

CONTEXT.md should be totally devoid of implementation details. Do not treat CONTEXT.md as a spec, a scratch pad, or a repository for implementation decisions. It is a glossary and nothing else.

Offer ADRs sparingly

Only offer to create an ADR when all three are true:

  1. Hard to reverse — the cost of changing your mind later is meaningful
  2. Surprising without context — a future reader will wonder "why did they do it this way?"
  3. The result of a real trade-off — there were genuine alternatives and you picked one for specific reasons

If any of the three is missing, skip the ADR. Use the format in ADR-FORMAT.md.

用于编辑和优化文章草稿,通过重构章节、提升清晰度和精简文本来改进内容。适用于用户希望修改或润色文章时。
用户要求编辑文章 用户希望改进文章清晰度 用户需要优化文章结构
agent/skills/edit-article/SKILL.md
npx skills add Remocn/remocn --skill edit-article -g -y
SKILL.md
Frontmatter
{
    "name": "edit-article",
    "description": "Edit and improve articles by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, or improve an article draft."
}
  1. First, divide the article into sections based on its headings. Think about the main points you want to make during those sections.

Consider that information is a directed acyclic graph, and that pieces of information can depend on other pieces of information. Make sure that the order of the sections and their contents respects these dependencies.

Confirm the sections with the user.

  1. For each section:

2a. Rewrite the section to improve clarity, coherence, and flow. Use maximum 240 characters per paragraph.

为 Claude Code 配置 PreToolUse 钩子,拦截并阻止 git push、reset --hard 等危险命令。支持按项目或全局安装,通过脚本验证执行权限,防止误操作导致数据丢失。
用户希望阻止危险的 git 操作 需要添加 git 安全钩子 在 Claude Code 中限制 git push 或 reset
agent/skills/git-guardrails-claude-code/SKILL.md
npx skills add Remocn/remocn --skill git-guardrails-claude-code -g -y
SKILL.md
Frontmatter
{
    "name": "git-guardrails-claude-code",
    "description": "Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute. Use when user wants to prevent destructive git operations, add git safety hooks, or block git push\/reset in Claude Code."
}

Setup Git Guardrails

Sets up a PreToolUse hook that intercepts and blocks dangerous git commands before Claude executes them.

What Gets Blocked

  • git push (all variants including --force)
  • git reset --hard
  • git clean -f / git clean -fd
  • git branch -D
  • git checkout . / git restore .

When blocked, Claude sees a message telling it that it does not have authority to access these commands.

Steps

1. Ask scope

Ask the user: install for this project only (.claude/settings.json) or all projects (~/.claude/settings.json)?

2. Copy the hook script

The bundled script is at: scripts/block-dangerous-git.sh

Copy it to the target location based on scope:

  • Project: .claude/hooks/block-dangerous-git.sh
  • Global: ~/.claude/hooks/block-dangerous-git.sh

Make it executable with chmod +x.

3. Add hook to settings

Add to the appropriate settings file:

Project (.claude/settings.json):

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Bash",
        "hooks": [
          {
            "type": "command",
            "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/block-dangerous-git.sh"
          }
        ]
      }
    ]
  }
}

Global (~/.claude/settings.json):

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Bash",
        "hooks": [
          {
            "type": "command",
            "command": "~/.claude/hooks/block-dangerous-git.sh"
          }
        ]
      }
    ]
  }
}

If the settings file already exists, merge the hook into existing hooks.PreToolUse array — don't overwrite other settings.

4. Ask about customization

Ask if user wants to add or remove any patterns from the blocked list. Edit the copied script accordingly.

5. Verify

Run a quick test:

echo '{"tool_input":{"command":"git push origin main"}}' | <path-to-script>

Should exit with code 2 and print a BLOCKED message to stderr.

用于对用户的计划或设计进行高强度压力测试。通过逐一提问并给出建议答案,深入探讨设计分支和决策依赖,直至达成共识。期间自动查阅代码库事实,仅询问需用户决定的事项,不执行计划。
用户希望在进行构建前压力测试计划或设计 用户使用了 'grill' 相关的触发短语
agent/skills/grilling/SKILL.md
npx skills add Remocn/remocn --skill grilling -g -y
SKILL.md
Frontmatter
{
    "name": "grilling",
    "description": "Grill the user relentlessly about a plan or design. Use when the user wants to stress-test a plan before building, or uses any 'grill' trigger phrases."
}

Interview me relentlessly about every aspect of this plan until we reach a shared understanding. Walk down each branch of the design tree, resolving dependencies between decisions one-by-one. For each question, provide your recommended answer.

Ask the questions one at a time, waiting for feedback on each question before continuing. Asking multiple questions at once is bewildering.

If a fact can be found by exploring the codebase, look it up rather than asking me. The decisions, though, are mine — put each one to me and wait for my answer.

Do not enact the plan until I confirm we have reached a shared understanding.

将当前对话压缩为交接文档,保存至用户OS临时目录。包含建议技能列表,引用而非复制现有工件,并脱敏敏感信息。若用户提供参数,则据此定制文档内容以供新Agent接续工作。
需要移交会话给其他Agent时 生成会话总结以便后续处理时
agent/skills/handoff/SKILL.md
npx skills add Remocn/remocn --skill handoff -g -y
SKILL.md
Frontmatter
{
    "name": "handoff",
    "description": "Compact the current conversation into a handoff document for another agent to pick up."
}

Write a handoff document summarising the current conversation so a fresh agent can continue the work. Save to the temporary directory of the user's OS - not the current workspace.

Include a "suggested skills" section in the document, which suggests skills that the agent should invoke.

Do not duplicate content already captured in other artifacts (specs, plans, ADRs, issues, commits, diffs). Reference them by path or URL instead.

Redact any sensitive information, such as API keys, passwords, or personally identifiable information.

If the user passed arguments, treat them as a description of what the next session will focus on and tailor the doc accordingly.

根据需求规格或工单实现功能,优先采用TDD模式。定期运行类型检查和单元测试,完成后执行全量测试及代码审查,最后提交至当前分支。
用户要求基于规范或工单进行开发实现 需要执行具体的编码任务并遵循测试驱动开发流程
agent/skills/implement/SKILL.md
npx skills add Remocn/remocn --skill implement -g -y
SKILL.md
Frontmatter
{
    "name": "implement",
    "description": "Implement a piece of work based on a spec or set of tickets."
}

Implement the work described by the user in the spec or tickets.

Use /tdd where possible, at pre-agreed seams.

Run typechecking regularly, single test files regularly, and the full test suite once at the end.

Once done, use /code-review to review the work.

Commit your work to the current branch.

扫描代码库以发现架构深化机会,生成包含可视化图表的HTML报告。基于领域模型和设计词汇识别浅层模块,提出重构建议以提升可测试性和AI导航性,并展示前后对比方案。
用户希望优化代码库架构 需要识别模块间的耦合与摩擦点 请求生成架构改进的可视化报告
agent/skills/improve-codebase-architecture/SKILL.md
npx skills add Remocn/remocn --skill improve-codebase-architecture -g -y
SKILL.md
Frontmatter
{
    "name": "improve-codebase-architecture",
    "description": "Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick."
}

Improve Codebase Architecture

Surface architectural friction and propose deepening opportunities — refactors that turn shallow modules into deep ones. The aim is testability and AI-navigability.

This command is informed by the project's domain model and built on a shared design vocabulary:

  • Run the /codebase-design skill for the architecture vocabulary (module, interface, depth, seam, adapter, leverage, locality) and its principles (the deletion test, "the interface is the test surface", "one adapter = hypothetical seam, two = real"). Use these terms exactly in every suggestion — don't drift into "component," "service," "API," or "boundary."
  • The domain language in CONTEXT.md gives names to good seams; ADRs in docs/adr/ record decisions this command should not re-litigate.

Process

1. Explore

Read the project's domain glossary (CONTEXT.md) and any ADRs in the area you're touching first.

Then use the Agent tool with subagent_type=Explore to walk the codebase. Don't follow rigid heuristics — explore organically and note where you experience friction:

  • Where does understanding one concept require bouncing between many small modules?
  • Where are modules shallow — interface nearly as complex as the implementation?
  • Where have pure functions been extracted just for testability, but the real bugs hide in how they're called (no locality)?
  • Where do tightly-coupled modules leak across their seams?
  • Which parts of the codebase are untested, or hard to test through their current interface?

Apply the deletion test to anything you suspect is shallow: would deleting it concentrate complexity, or just move it? A "yes, concentrates" is the signal you want.

2. Present candidates as an HTML report

Write a self-contained HTML file to the OS temp directory so nothing lands in the repo. Resolve the temp dir from $TMPDIR, falling back to /tmp (or %TEMP% on Windows), and write to <tmpdir>/architecture-review-<timestamp>.html so each run gets a fresh file. Open it for the user — xdg-open <path> on Linux, open <path> on macOS, start <path> on Windows — and tell them the absolute path.

The report uses Tailwind via CDN for layout and styling, and Mermaid via CDN for diagrams where a graph/flow/sequence reliably communicates the structure. Mix Mermaid with hand-crafted CSS/SVG visuals — use Mermaid when relationships are graph-shaped (call graphs, dependencies, sequences), and hand-built divs/SVG when you want something more editorial (mass diagrams, cross-sections, collapse animations). Each candidate gets a before/after visualisation. Be visual.

For each candidate, render a card with:

  • Files — which files/modules are involved
  • Problem — why the current architecture is causing friction
  • Solution — plain English description of what would change
  • Benefits — explained in terms of locality and leverage, and how tests would improve
  • Before / After diagram — side-by-side, custom-drawn, illustrating the shallowness and the deepening
  • Recommendation strength — one of Strong, Worth exploring, Speculative, rendered as a badge

End the report with a Top recommendation section: which candidate you'd tackle first and why.

Use CONTEXT.md vocabulary for the domain, and the /codebase-design vocabulary for the architecture. If CONTEXT.md defines "Order," talk about "the Order intake module" — not "the FooBarHandler," and not "the Order service."

ADR conflicts: if a candidate contradicts an existing ADR, only surface it when the friction is real enough to warrant revisiting the ADR. Mark it clearly in the card (e.g. a warning callout: "contradicts ADR-0007 — but worth reopening because…"). Don't list every theoretical refactor an ADR forbids.

See HTML-REPORT.md for the full HTML scaffold, diagram patterns, and styling guidance.

Do NOT propose interfaces yet. After the file is written, ask the user: "Which of these would you like to explore?"

3. Grilling loop

Once the user picks a candidate, run the /grilling skill to walk the design tree with them — constraints, dependencies, the shape of the deepened module, what sits behind the seam, what tests survive.

Side effects happen inline as decisions crystallize — run the /domain-modeling skill to keep the domain model current as you go:

  • Naming a deepened module after a concept not in CONTEXT.md? Add the term to CONTEXT.md. Create the file lazily if it doesn't exist.
  • Sharpening a fuzzy term during the conversation? Update CONTEXT.md right there.
  • User rejects the candidate with a load-bearing reason? Offer an ADR, framed as: "Want me to record this as an ADR so future architecture reviews don't re-suggest it?" Only offer when the reason would actually be needed by a future explorer to avoid re-suggesting the same thing — skip ephemeral reasons ("not worth it right now") and self-evident ones.
  • Want to explore alternative interfaces for the deepened module? Run the /codebase-design skill and use its design-it-twice parallel sub-agent pattern.
通过持续追问厘清用户工作流需求,聚焦生活循环模式。利用特定术语(触发器、检查点等)细化规范,直至实现者可无疑问执行,最终生成或更新工作流规格文件。
需要构建或优化自动化工作流 希望梳理日常重复性任务并委托给AI
agent/skills/loop-me/SKILL.md
npx skills add Remocn/remocn --skill loop-me -g -y
SKILL.md
Frontmatter
{
    "name": "loop-me",
    "description": "Grill me about specs for the workflows I want to build, within this workspace."
}

Run a stateful /grilling session whose only output is workflow specs. Use the grilling discipline — relentless, one question at a time, a recommended answer attached to each — aimed at the vocabulary and goal below. Create, edit, and delete specs as the grilling resolves things.

The loop lens

A loop is a recurring pattern in the user's life: their career, their week, their morning, a single repeated activity. Picturing a life as loops within loops reveals how predictable its activities really are — which is what makes them worth delegating. Use the lens to find loops worth specifying, and propose ones the user hasn't noticed.

A workflow is the spec of one loop, made real. You run a workflow on a loop — the loop is its running instantiation. Workflows live in workflows/*.md and are the source of truth.

Vocabulary

A shared language, reached for only when a workflow calls for it — never a checklist. Mandate nothing structural: a workflow needs no AI, no checkpoint, and no schedule unless the grilling shows it does.

  • Trigger — what fires each run: an event (a new email, a new issue) or a schedule (every morning). Event-triggering is usually the more efficient.
  • Checkpoint — a human-in-the-loop point where the user is asked to verify or decide. Some workflows have none and run autonomously; some use no AI at all.
  • Push right — defer the checkpoint as far as it will go. Do maximal work before involving the human, so they are asked once, late, with everything prepared.
  • Brief — what a checkpoint presents: a tight, decision-ready summary — what was produced, why, and a link down to the asset itself — never the raw output. The user reads a brief, not a draft. Speed of review is imperative.

Definition of done

A workflow spec is done when an implementer agent could build it without asking a single question. Grill until then; nothing is done while a question remains.

The workspace

  • workflows/*.md — one spec per workflow.
  • NOTES.md — raw notes on the user's world: the tools they use, the channels they process, and their own terminology for both. When it is empty or thin, interview them about their world before specifying anything. Sharpen fuzzy terms into canonical ones as they surface, and record them here.
将测试文件中的 as 类型断言迁移至 @total-typescript/shoehorn,支持使用 fromPartial 处理部分数据、fromAny 处理故意错误数据,提升测试代码的类型安全性与可维护性。
用户提到 shoehorn 用户希望替换测试中的 as 断言 用户需要生成部分测试数据
agent/skills/migrate-to-shoehorn/SKILL.md
npx skills add Remocn/remocn --skill migrate-to-shoehorn -g -y
SKILL.md
Frontmatter
{
    "name": "migrate-to-shoehorn",
    "description": "Migrate test files from `as` type assertions to @total-typescript\/shoehorn. Use when user mentions shoehorn, wants to replace `as` in tests, or needs partial test data."
}

Migrate to Shoehorn

Why shoehorn?

shoehorn lets you pass partial data in tests while keeping TypeScript happy. It replaces as assertions with type-safe alternatives.

Test code only. Never use shoehorn in production code.

Problems with as in tests:

  • Trained not to use it
  • Must manually specify target type
  • Double-as (as unknown as Type) for intentionally wrong data

Install

npm i @total-typescript/shoehorn

Migration patterns

Large objects with few needed properties

Before:

type Request = {
  body: { id: string };
  headers: Record<string, string>;
  cookies: Record<string, string>;
  // ...20 more properties
};

it("gets user by id", () => {
  // Only care about body.id but must fake entire Request
  getUser({
    body: { id: "123" },
    headers: {},
    cookies: {},
    // ...fake all 20 properties
  });
});

After:

import { fromPartial } from "@total-typescript/shoehorn";

it("gets user by id", () => {
  getUser(
    fromPartial({
      body: { id: "123" },
    }),
  );
});

as TypefromPartial()

Before:

getUser({ body: { id: "123" } } as Request);

After:

import { fromPartial } from "@total-typescript/shoehorn";

getUser(fromPartial({ body: { id: "123" } }));

as unknown as TypefromAny()

Before:

getUser({ body: { id: 123 } } as unknown as Request); // wrong type on purpose

After:

import { fromAny } from "@total-typescript/shoehorn";

getUser(fromAny({ body: { id: 123 } }));

When to use each

Function Use case
fromPartial() Pass partial data that still type-checks
fromAny() Pass intentionally wrong data (keeps autocomplete)
fromExact() Force full object (swap with fromPartial later)

Workflow

  1. Gather requirements - ask user:

    • What test files have as assertions causing problems?
    • Are they dealing with large objects where only some properties matter?
    • Do they need to pass intentionally wrong data for error testing?
  2. Install and migrate:

    • Install: npm i @total-typescript/shoehorn
    • Find test files with as assertions: grep -r " as [A-Z]" --include="*.test.ts" --include="*.spec.ts"
    • Replace as Type with fromPartial()
    • Replace as unknown as Type with fromAny()
    • Add imports from @total-typescript/shoehorn
    • Run type check to verify
用于在 Obsidian 知识库中搜索、创建和管理笔记。支持按文件名或内容检索,规范命名与 wikilink 链接格式,查找反向链接及索引笔记,实现无文件夹的扁平化知识组织。
用户需要在 Obsidian 中查找特定笔记 用户希望创建新的学习单元笔记 用户想要整理或组织现有笔记结构 用户需要查找与某主题相关的反向链接
agent/skills/obsidian-vault/SKILL.md
npx skills add Remocn/remocn --skill obsidian-vault -g -y
SKILL.md
Frontmatter
{
    "name": "obsidian-vault",
    "description": "Search, create, and manage notes in the Obsidian vault with wikilinks and index notes. Use when user wants to find, create, or organize notes in Obsidian."
}

Obsidian Vault

Vault location

/mnt/d/Obsidian Vault/AI Research/

Mostly flat at root level.

Naming conventions

  • Index notes: aggregate related topics (e.g., Ralph Wiggum Index.md, Skills Index.md, RAG Index.md)
  • Title case for all note names
  • No folders for organization - use links and index notes instead

Linking

  • Use Obsidian [[wikilinks]] syntax: [[Note Title]]
  • Notes link to dependencies/related notes at the bottom
  • Index notes are just lists of [[wikilinks]]

Workflows

Search for notes

# Search by filename
find "/mnt/d/Obsidian Vault/AI Research/" -name "*.md" | grep -i "keyword"

# Search by content
grep -rl "keyword" "/mnt/d/Obsidian Vault/AI Research/" --include="*.md"

Or use Grep/Glob tools directly on the vault path.

Create a new note

  1. Use Title Case for filename
  2. Write content as a unit of learning (per vault rules)
  3. Add [[wikilinks]] to related notes at the bottom
  4. If part of a numbered sequence, use the hierarchical numbering scheme

Find related notes

Search for [[Note Title]] across the vault to find backlinks:

grep -rl "\\[\\[Note Title\\]\\]" "/mnt/d/Obsidian Vault/AI Research/"

Find index notes

find "/mnt/d/Obsidian Vault/AI Research/" -name "*Index*"
用于构建一次性原型以验证设计问题。根据需求分为逻辑状态机测试和UI界面变体探索两条分支。遵循快速运行、无持久化、不追求完美等规则,旨在快速验证后删除或吸收代码。
用户希望验证状态模型或逻辑是否正确 用户希望探索UI界面的视觉呈现效果
agent/skills/prototype/SKILL.md
npx skills add Remocn/remocn --skill prototype -g -y
SKILL.md
Frontmatter
{
    "name": "prototype",
    "description": "Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like."
}

Prototype

A prototype is throwaway code that answers a question. The question decides the shape.

Pick a branch

Identify which question is being answered — from the user's prompt, the surrounding code, or by asking if the user is around:

  • "Does this logic / state model feel right?"LOGIC.md. Build a tiny interactive terminal app that pushes the state machine through cases that are hard to reason about on paper.
  • "What should this look like?"UI.md. Generate several radically different UI variations on a single route, switchable via a URL search param and a floating bottom bar.

The two branches produce very different artifacts — getting this wrong wastes the whole prototype. If the question is genuinely ambiguous and the user isn't reachable, default to whichever branch better matches the surrounding code (a backend module → logic; a page or component → UI) and state the assumption at the top of the prototype.

Rules that apply to both

  1. Throwaway from day one, and clearly marked as such. Locate the prototype code close to where it will actually be used (next to the module or page it's prototyping for) so context is obvious — but name it so a casual reader can see it's a prototype, not production. For throwaway UI routes, obey whatever routing convention the project already uses; don't invent a new top-level structure.
  2. One command to run. Whatever the project's existing task runner supports — pnpm <name>, python <path>, bun <path>, etc. The user must be able to start it without thinking.
  3. No persistence by default. State lives in memory. Persistence is the thing the prototype is checking, not something it should depend on. If the question explicitly involves a database, hit a scratch DB or a local file with a clear "PROTOTYPE — wipe me" name.
  4. Skip the polish. No tests, no error handling beyond what makes the prototype runnable, no abstractions. The point is to learn something fast and then delete it.
  5. Surface the state. After every action (logic) or on every variant switch (UI), print or render the full relevant state so the user can see what changed.
  6. Delete or absorb when done. When the prototype has answered its question, either delete it or fold the validated decision into the real code — don't leave it rotting in the repo.

When done

The answer is the only thing worth keeping from a prototype. Capture it somewhere durable (commit message, ADR, issue, or a NOTES.md next to the prototype) along with the question it was answering. If the user is around, that capture is a quick conversation; if not, leave the placeholder so they (or you, on the next pass) can fill in the verdict before deleting the prototype.

Interactive QA session where user reports bugs or issues conversationally, and the agent files GitHub issues. Explores the codebase in the background for context and domain language. Use when user wants to report bugs, do QA, file issues conversationally, or mentions "QA session".
agent/skills/qa/SKILL.md
npx skills add Remocn/remocn --skill qa -g -y
SKILL.md
Frontmatter
{
    "name": "qa",
    "description": "Interactive QA session where user reports bugs or issues conversationally, and the agent files GitHub issues. Explores the codebase in the background for context and domain language. Use when user wants to report bugs, do QA, file issues conversationally, or mentions \"QA session\"."
}

QA Session

Run an interactive QA session. The user describes problems they're encountering. You clarify, explore the codebase for context, and file GitHub issues that are durable, user-focused, and use the project's domain language.

For each issue the user raises

1. Listen and lightly clarify

Let the user describe the problem in their own words. Ask at most 2-3 short clarifying questions focused on:

  • What they expected vs what actually happened
  • Steps to reproduce (if not obvious)
  • Whether it's consistent or intermittent

Do NOT over-interview. If the description is clear enough to file, move on.

2. Explore the codebase in the background

While talking to the user, kick off an Agent (subagent_type=Explore) in the background to understand the relevant area. The goal is NOT to find a fix — it's to:

  • Learn the domain language used in that area (check UBIQUITOUS_LANGUAGE.md)
  • Understand what the feature is supposed to do
  • Identify the user-facing behavior boundary

This context helps you write a better issue — but the issue itself should NOT reference specific files, line numbers, or internal implementation details.

3. Assess scope: single issue or breakdown?

Before filing, decide whether this is a single issue or needs to be broken down into multiple issues.

Break down when:

  • The fix spans multiple independent areas (e.g. "the form validation is wrong AND the success message is missing AND the redirect is broken")
  • There are clearly separable concerns that different people could work on in parallel
  • The user describes something that has multiple distinct failure modes or symptoms

Keep as a single issue when:

  • It's one behavior that's wrong in one place
  • The symptoms are all caused by the same root behavior

4. File the GitHub issue(s)

Create issues with gh issue create. Do NOT ask the user to review first — just file and share URLs.

Issues must be durable — they should still make sense after major refactors. Write from the user's perspective.

For a single issue

Use this template:

## What happened

[Describe the actual behavior the user experienced, in plain language]

## What I expected

[Describe the expected behavior]

## Steps to reproduce

1. [Concrete, numbered steps a developer can follow]
2. [Use domain terms from the codebase, not internal module names]
3. [Include relevant inputs, flags, or configuration]

## Additional context

[Any extra observations from the user or from codebase exploration that help frame the issue — e.g. "this only happens when using the Docker layer, not the filesystem layer" — use domain language but don't cite files]

For a breakdown (multiple issues)

Create issues in dependency order (blockers first) so you can reference real issue numbers.

Use this template for each sub-issue:

## Parent issue

#<parent-issue-number> (if you created a tracking issue) or "Reported during QA session"

## What's wrong

[Describe this specific behavior problem — just this slice, not the whole report]

## What I expected

[Expected behavior for this specific slice]

## Steps to reproduce

1. [Steps specific to THIS issue]

## Blocked by

- #<issue-number> (if this issue can't be fixed until another is resolved)

Or "None — can start immediately" if no blockers.

## Additional context

[Any extra observations relevant to this slice]

When creating a breakdown:

  • Prefer many thin issues over few thick ones — each should be independently fixable and verifiable
  • Mark blocking relationships honestly — if issue B genuinely can't be tested until issue A is fixed, say so. If they're independent, mark both as "None — can start immediately"
  • Create issues in dependency order so you can reference real issue numbers in "Blocked by"
  • Maximize parallelism — the goal is that multiple people (or agents) can grab different issues simultaneously

Rules for all issue bodies

  • No file paths or line numbers — these go stale
  • Use the project's domain language (check UBIQUITOUS_LANGUAGE.md if it exists)
  • Describe behaviors, not code — "the sync service fails to apply the patch" not "applyPatch() throws on line 42"
  • Reproduction steps are mandatory — if you can't determine them, ask the user
  • Keep it concise — a developer should be able to read the issue in 30 seconds

After filing, print all issue URLs (with blocking relationships summarized) and ask: "Next issue, or are we done?"

5. Continue the session

Keep going until the user says they're done. Each issue is independent — don't batch them.

通过用户访谈深入分析重构需求,探索代码库现状并评估测试覆盖,制定极细粒度的增量提交计划。最终生成包含问题陈述、解决方案、决策及测试策略的详细重构方案,并将其作为 GitHub Issue 归档,确保重构过程安全可控且每一步均可工作。
用户希望规划代码重构 用户需要创建重构 RFC 用户想将重构分解为安全的增量步骤
agent/skills/request-refactor-plan/SKILL.md
npx skills add Remocn/remocn --skill request-refactor-plan -g -y
SKILL.md
Frontmatter
{
    "name": "request-refactor-plan",
    "description": "Create a detailed refactor plan with tiny commits via user interview, then file it as a GitHub issue. Use when user wants to plan a refactor, create a refactoring RFC, or break a refactor into safe incremental steps."
}

This skill will be invoked when the user wants to create a refactor request. You should go through the steps below. You may skip steps if you don't consider them necessary.

  1. Ask the user for a long, detailed description of the problem they want to solve and any potential ideas for solutions.

  2. Explore the repo to verify their assertions and understand the current state of the codebase.

  3. Ask whether they have considered other options, and present other options to them.

  4. Interview the user about the implementation. Be extremely detailed and thorough.

  5. Hammer out the exact scope of the implementation. Work out what you plan to change and what you plan not to change.

  6. Look in the codebase to check for test coverage of this area of the codebase. If there is insufficient test coverage, ask the user what their plans for testing are.

  7. Break the implementation into a plan of tiny commits. Remember Martin Fowler's advice to "make each refactoring step as small as possible, so that you can always see the program working."

  8. Create a GitHub issue with the refactor plan. Use the following template for the issue description:

Problem Statement

The problem that the developer is facing, from the developer's perspective.

Solution

The solution to the problem, from the developer's perspective.

Commits

A LONG, detailed implementation plan. Write the plan in plain English, breaking down the implementation into the tiniest commits possible. Each commit should leave the codebase in a working state.

Decision Document

A list of implementation decisions that were made. This can include:

  • The modules that will be built/modified
  • The interfaces of those modules that will be modified
  • Technical clarifications from the developer
  • Architectural decisions
  • Schema changes
  • API contracts
  • Specific interactions

Do NOT include specific file paths or code snippets. They may end up being outdated very quickly.

Testing Decisions

A list of testing decisions that were made. Include:

  • A description of what makes a good test (only test external behavior, not implementation details)
  • Which modules will be tested
  • Prior art for the tests (i.e. similar types of tests in the codebase)

Out of Scope

A description of the things that are out of scope for this refactor.

Further Notes (optional)

Any further notes about the refactor.

启动后台代理,针对高信任度的官方文档、源码或规范等一手来源进行深入调查。将调查结果整理为带有引用标注的 Markdown 文件并保存至仓库,适用于用户需要背景调研、API 事实核查或文献收集的场景。
用户需要对某个主题进行深入研究 用户需要收集官方文档或 API 相关的事实信息 用户希望委托后台代理完成文献阅读和资料整理工作
agent/skills/research/SKILL.md
npx skills add Remocn/remocn --skill research -g -y
SKILL.md
Frontmatter
{
    "name": "research",
    "description": "Investigate a question against high-trust primary sources and capture the findings as a Markdown file in the repo. Use when the user wants a topic researched, docs or API facts gathered, or reading legwork delegated to a background agent."
}

Spin up a background agent to do the research, so you keep working while it reads.

Its job:

  1. Investigate the question against primary sources — official docs, source code, specs, first-party APIs — not a secondary write-up of them. Follow every claim back to the source that owns it.
  2. Write the findings to a single Markdown file, citing each claim's source.
  3. Save it where the repo already keeps such notes; match the existing convention, and if there is none, put it somewhere sensible and say where.
用于解决 Git 合并或变基过程中产生的冲突。通过检查状态、分析冲突源意图、保留双方逻辑并修复自动化检查失败,最终完成提交或继续变基流程。
Git 合并冲突 Git 变基冲突
agent/skills/resolving-merge-conflicts/SKILL.md
npx skills add Remocn/remocn --skill resolving-merge-conflicts -g -y
SKILL.md
Frontmatter
{
    "name": "resolving-merge-conflicts",
    "description": "Use when you need to resolve an in-progress git merge\/rebase conflict."
}
  1. See the current state of the merge/rebase. Check git history, and the conflicting files.

  2. Find the primary sources for each conflict. Understand deeply why each change was made, and what the original intent was. Read the commit messages, check the PRs, check original issues/tickets.

  3. Resolve each hunk. Preserve both intents where possible. Where incompatible, pick the one matching the merge's stated goal and note the trade-off. Do not invent new behaviour. Always resolve; never --abort.

  4. Discover the project's automated checks and run them — typically typecheck, then tests, then format. Fix anything the merge broke.

  5. Finish the merge/rebase. Stage everything and commit. If rebasing, continue the rebase process until all commits are rebased.

用于根据计划自动生成符合规范的练习目录结构。支持创建章节、习题及其问题、解答和解释子文件夹,生成最小化readme存根,并执行lint检查以确保代码规范无误。
用户希望搭建新的课程章节或练习结构 需要为现有课程生成习题存根文件
agent/skills/scaffold-exercises/SKILL.md
npx skills add Remocn/remocn --skill scaffold-exercises -g -y
SKILL.md
Frontmatter
{
    "name": "scaffold-exercises",
    "description": "Create exercise directory structures with sections, problems, solutions, and explainers that pass linting. Use when user wants to scaffold exercises, create exercise stubs, or set up a new course section."
}

Scaffold Exercises

Create exercise directory structures that pass pnpm ai-hero-cli internal lint, then commit with git commit.

Directory naming

  • Sections: XX-section-name/ inside exercises/ (e.g., 01-retrieval-skill-building)
  • Exercises: XX.YY-exercise-name/ inside a section (e.g., 01.03-retrieval-with-bm25)
  • Section number = XX, exercise number = XX.YY
  • Names are dash-case (lowercase, hyphens)

Exercise variants

Each exercise needs at least one of these subfolders:

  • problem/ - student workspace with TODOs
  • solution/ - reference implementation
  • explainer/ - conceptual material, no TODOs

When stubbing, default to explainer/ unless the plan specifies otherwise.

Required files

Each subfolder (problem/, solution/, explainer/) needs a readme.md that:

  • Is not empty (must have real content, even a single title line works)
  • Has no broken links

When stubbing, create a minimal readme with a title and a description:

# Exercise Title

Description here

If the subfolder has code, it also needs a main.ts (>1 line). But for stubs, a readme-only exercise is fine.

Workflow

  1. Parse the plan - extract section names, exercise names, and variant types
  2. Create directories - mkdir -p for each path
  3. Create stub readmes - one readme.md per variant folder with a title
  4. Run lint - pnpm ai-hero-cli internal lint to validate
  5. Fix any errors - iterate until lint passes

Lint rules summary

The linter (pnpm ai-hero-cli internal lint) checks:

  • Each exercise has subfolders (problem/, solution/, explainer/)
  • At least one of problem/, explainer/, or explainer.1/ exists
  • readme.md exists and is non-empty in the primary subfolder
  • No .gitkeep files
  • No speaker-notes.md files
  • No broken links in readmes
  • No pnpm run exercise commands in readmes
  • main.ts required per subfolder unless it's readme-only

Moving/renaming exercises

When renumbering or moving exercises:

  1. Use git mv (not mv) to rename directories - preserves git history
  2. Update the numeric prefix to maintain order
  3. Re-run lint after moves

Example:

git mv exercises/01-retrieval/01.03-embeddings exercises/01-retrieval/01.04-embeddings

Example: stubbing from a plan

Given a plan like:

Section 05: Memory Skill Building
- 05.01 Introduction to Memory
- 05.02 Short-term Memory (explainer + problem + solution)
- 05.03 Long-term Memory

Create:

mkdir -p exercises/05-memory-skill-building/05.01-introduction-to-memory/explainer
mkdir -p exercises/05-memory-skill-building/05.02-short-term-memory/{explainer,problem,solution}
mkdir -p exercises/05-memory-skill-building/05.03-long-term-memory/explainer

Then create readme stubs:

exercises/05-memory-skill-building/05.01-introduction-to-memory/explainer/readme.md -> "# Introduction to Memory"
exercises/05-memory-skill-building/05.02-short-term-memory/explainer/readme.md -> "# Short-term Memory"
exercises/05-memory-skill-building/05.02-short-term-memory/problem/readme.md -> "# Short-term Memory"
exercises/05-memory-skill-building/05.02-short-term-memory/solution/readme.md -> "# Short-term Memory"
exercises/05-memory-skill-building/05.03-long-term-memory/explainer/readme.md -> "# Long-term Memory"
配置工程技能所需的仓库初始化设置,包括问题追踪器、分类标签词汇和领域文档布局。通过探索仓库现状并与用户逐项确认,建立适用于 GitHub、GitLab 或本地 Markdown 等场景的基础设施,为后续工程技能运行做准备。
首次使用工程技能前需初始化仓库 需要配置 issue tracker、triage labels 或 domain docs
agent/skills/setup-matt-pocock-skills/SKILL.md
npx skills add Remocn/remocn --skill setup-matt-pocock-skills -g -y
SKILL.md
Frontmatter
{
    "name": "setup-matt-pocock-skills",
    "description": "Configure this repo for the engineering skills — set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills."
}

Setup Matt Pocock's Skills

Scaffold the per-repo configuration that the engineering skills assume:

  • Issue tracker — where issues live (GitHub by default; local markdown is also supported out of the box)
  • Triage labels — the strings used for the five canonical triage roles
  • Domain docs — where CONTEXT.md and ADRs live, and the consumer rules for reading them

This is a prompt-driven skill, not a deterministic script. Explore, present what you found, confirm with the user, then write.

Process

1. Explore

Look at the current repo to understand its starting state. Read whatever exists; don't assume:

  • git remote -v and .git/config — is this a GitHub repo? Which one?
  • AGENTS.md and CLAUDE.md at the repo root — does either exist? Is there already an ## Agent skills section in either?
  • CONTEXT.md and CONTEXT-MAP.md at the repo root
  • docs/adr/ and any src/*/docs/adr/ directories
  • docs/agents/ — does this skill's prior output already exist?
  • .scratch/ — sign that a local-markdown issue tracker convention is already in use

2. Present findings and ask

Summarise what's present and what's missing. Then walk the user through the three decisions one at a time — present a section, get the user's answer, then move to the next. Don't dump all three at once.

Assume the user does not know what these terms mean. Each section starts with a short explainer (what it is, why these skills need it, what changes if they pick differently). Then show the choices and the default.

Section A — Issue tracker.

Explainer: The "issue tracker" is where issues live for this repo. Skills like to-tickets, triage, to-spec, and qa read from and write to it — they need to know whether to call gh issue create, write a markdown file under .scratch/, or follow some other workflow you describe. Pick the place you actually track work for this repo.

Default posture: these skills were designed for GitHub. If a git remote points at GitHub, propose that. If a git remote points at GitLab (gitlab.com or a self-hosted host), propose GitLab. Otherwise (or if the user prefers), offer:

  • GitHub — issues live in the repo's GitHub Issues (uses the gh CLI)
  • GitLab — issues live in the repo's GitLab Issues (uses the glab CLI)
  • Local markdown — issues live as files under .scratch/<feature>/ in this repo (good for solo projects or repos without a remote)
  • Other (Jira, Linear, etc.) — ask the user to describe the workflow in one paragraph; the skill will record it as freeform prose

If — and only if — the user picked GitHub or GitLab, ask one follow-up:

Explainer: Open-source repos often receive feature requests as pull requests, not just issues — a PR is an issue with attached code. If you turn this on, /triage pulls external PRs into the same queue and runs them through the same labels and states as issues (collaborators' in-flight PRs are left alone). Leave it off if PRs aren't a request surface for you.

  • PRs as a request surface — yes / no (default: no). Record the answer in docs/agents/issue-tracker.md. For local-markdown and other trackers, skip this question — there are no PRs.

Section B — Triage label vocabulary.

Explainer: When the triage skill processes an incoming issue, it moves it through a state machine — needs evaluation, waiting on reporter, ready for an AFK agent to pick up, ready for a human, or won't fix. To do that, it needs to apply labels (or the equivalent in your issue tracker) that match strings you've actually configured. If your repo already uses different label names (e.g. bug:triage instead of needs-triage), map them here so the skill applies the right ones instead of creating duplicates.

The five canonical roles:

  • needs-triage — maintainer needs to evaluate
  • needs-info — waiting on reporter
  • ready-for-agent — fully specified, AFK-ready (an agent can pick it up with no human context)
  • ready-for-human — needs human implementation
  • wontfix — will not be actioned

Default: each role's string equals its name. Ask the user if they want to override any. If their issue tracker has no existing labels, the defaults are fine.

Section C — Domain docs.

Explainer: Some skills (improve-codebase-architecture, diagnosing-bugs, tdd) read a CONTEXT.md file to learn the project's domain language, and docs/adr/ for past architectural decisions. They need to know whether the repo has one global context or multiple (e.g. a monorepo with separate frontend/backend contexts) so they look in the right place.

Confirm the layout:

  • Single-context — one CONTEXT.md + docs/adr/ at the repo root. Most repos are this.
  • Multi-contextCONTEXT-MAP.md at the root pointing to per-context CONTEXT.md files (typically a monorepo).

3. Confirm and edit

Show the user a draft of:

  • The ## Agent skills block to add to whichever of CLAUDE.md / AGENTS.md is being edited (see step 4 for selection rules)
  • The contents of docs/agents/issue-tracker.md, docs/agents/triage-labels.md, docs/agents/domain.md

Let them edit before writing.

4. Write

Pick the file to edit:

  • If CLAUDE.md exists, edit it.
  • Else if AGENTS.md exists, edit it.
  • If neither exists, ask the user which one to create — don't pick for them.

Never create AGENTS.md when CLAUDE.md already exists (or vice versa) — always edit the one that's already there.

If an ## Agent skills block already exists in the chosen file, update its contents in-place rather than appending a duplicate. Don't overwrite user edits to the surrounding sections.

The block:

## Agent skills

### Issue tracker

[one-line summary of where issues are tracked, plus whether external PRs are a triage surface]. See `docs/agents/issue-tracker.md`.

### Triage labels

[one-line summary of the label vocabulary]. See `docs/agents/triage-labels.md`.

### Domain docs

[one-line summary of layout — "single-context" or "multi-context"]. See `docs/agents/domain.md`.

Then write the three docs files using the seed templates in this skill folder as a starting point:

For "other" issue trackers, write docs/agents/issue-tracker.md from scratch using the user's description.

5. Done

Tell the user the setup is complete and which engineering skills will now read from these files. Mention they can edit docs/agents/*.md directly later — re-running this skill is only necessary if they want to switch issue trackers or restart from scratch.

用于在当前仓库配置 Husky pre-commit 钩子,集成 lint-staged、Prettier 格式化、类型检查和测试。自动检测包管理器,安装依赖并生成配置文件,确保提交前代码质量。
用户希望添加 pre-commit 钩子 用户需要设置 Husky 用户想配置 lint-staged 用户希望增加提交时的格式化或检查功能
agent/skills/setup-pre-commit/SKILL.md
npx skills add Remocn/remocn --skill setup-pre-commit -g -y
SKILL.md
Frontmatter
{
    "name": "setup-pre-commit",
    "description": "Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting\/typechecking\/testing."
}

Setup Pre-Commit Hooks

What This Sets Up

  • Husky pre-commit hook
  • lint-staged running Prettier on all staged files
  • Prettier config (if missing)
  • typecheck and test scripts in the pre-commit hook

Steps

1. Detect package manager

Check for package-lock.json (npm), pnpm-lock.yaml (pnpm), yarn.lock (yarn), bun.lockb (bun). Use whichever is present. Default to npm if unclear.

2. Install dependencies

Install as devDependencies:

husky lint-staged prettier

3. Initialize Husky

npx husky init

This creates .husky/ dir and adds prepare: "husky" to package.json.

4. Create .husky/pre-commit

Write this file (no shebang needed for Husky v9+):

npx lint-staged
npm run typecheck
npm run test

Adapt: Replace npm with detected package manager. If repo has no typecheck or test script in package.json, omit those lines and tell the user.

5. Create .lintstagedrc

{
  "*": "prettier --ignore-unknown --write"
}

6. Create .prettierrc (if missing)

Only create if no Prettier config exists. Use these defaults:

{
  "useTabs": false,
  "tabWidth": 2,
  "printWidth": 80,
  "singleQuote": false,
  "trailingComma": "es5",
  "semi": true,
  "arrowParens": "always"
}

7. Verify

  • .husky/pre-commit exists and is executable
  • .lintstagedrc exists
  • prepare script in package.json is "husky"
  • prettier config exists
  • Run npx lint-staged to verify it works

8. Commit

Stage all changed/created files and commit with message: Add pre-commit hooks (husky + lint-staged + prettier)

This will run through the new pre-commit hooks — a good smoke test that everything works.

Notes

  • Husky v9+ doesn't need shebangs in hook files
  • prettier --ignore-unknown skips files Prettier can't parse (images, etc.)
  • The pre-commit runs lint-staged first (fast, staged-only), then full typecheck and tests
指导测试驱动开发(TDD)流程,遵循红绿重构循环。强调通过公共接口(接缝)验证行为,避免实现耦合、同义反复和水平切片等反模式。要求先确认测试范围,按垂直切片逐个编写失败测试并最小化实现,确保测试像规范一样可维护。
用户希望以测试优先方式构建功能或修复bug 提及 'red-green-refactor' 需要集成测试
agent/skills/tdd/SKILL.md
npx skills add Remocn/remocn --skill tdd -g -y
SKILL.md
Frontmatter
{
    "name": "tdd",
    "description": "Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions \"red-green-refactor\", or wants integration tests."
}

Test-Driven Development

TDD is the red → green loop. This skill is the reference that makes that loop produce tests worth keeping: what a good test is, where tests go, the anti-patterns, and the rules of the loop. Every section applies on every cycle — consult them before and during the loop, not after.

When exploring the codebase, read CONTEXT.md (if it exists) so test names and interface vocabulary match the project's domain language, and respect ADRs in the area you're touching.

What a good test is

Tests verify behavior through public interfaces, not implementation details. Code can change entirely; tests shouldn't. A good test reads like a specification — "user can checkout with valid cart" tells you exactly what capability exists — and survives refactors because it doesn't care about internal structure.

See tests.md for examples and mocking.md for mocking guidelines.

Seams — where tests go

A seam is the public boundary you test at: the interface where you observe behavior without reaching inside. Tests live at seams, never against internals.

Test only at pre-agreed seams. Before writing any test, write down the seams under test and confirm them with the user. No test is written at an unconfirmed seam. You can't test everything — agreeing the seams up front is how testing effort lands on the critical paths and complex logic instead of every edge case.

Ask: "What's the public interface, and which seams should we test?"

Anti-patterns

  • Implementation-coupled — mocks internal collaborators, tests private methods, or verifies through a side channel (querying the database instead of using the interface). The tell: the test breaks when you refactor but behavior hasn't changed.
  • Tautological — the assertion recomputes the expected value the way the code does (expect(add(a, b)).toBe(a + b), a snapshot derived by hand the same way, a constant asserted equal to itself), so it passes by construction and can never disagree with the code. Expected values must come from an independent source of truth — a known-good literal, a worked example, the spec.
  • Horizontal slicing — writing all tests first, then all implementation. Bulk tests verify imagined behavior: you test the shape of things rather than user-facing behavior, the tests go insensitive to real changes, and you commit to test structure before understanding the implementation. Work in vertical slices instead — one test → one implementation → repeat, each test a tracer bullet that responds to what the last cycle taught you.

Rules of the loop

  • Red before green. Write the failing test first, then only enough code to pass it. Don't anticipate future tests or add speculative features.
  • One slice at a time. One seam, one test, one minimal implementation per cycle.
  • Refactoring is not part of the loop. It belongs to the review stage (see the code-review skill), not the red → green implementation cycle.
用于在多会话中系统性地教授用户新技能或概念。通过维护工作区文件(如任务目标、参考资料、学习记录和课程)来跟踪学习进度,强调基于高质量资源构建长期记忆而非短期流利度,实现深度且结构化的个性化教学。
用户请求学习新知识 用户希望掌握某项技能
agent/skills/teach/SKILL.md
npx skills add Remocn/remocn --skill teach -g -y
SKILL.md
Frontmatter
{
    "name": "teach",
    "description": "Teach the user a new skill or concept, within this workspace."
}

The user has asked you to teach them something. This is a stateful request - they intend to learn the topic over multiple sessions.

Teaching Workspace

Treat the current directory as a teaching workspace. The state of their learning is captured in this directory in several files:

  • MISSION.md: A document capturing the reason the user is interested in the topic. This should be used to ground all teaching. Use the format in MISSION-FORMAT.md.
  • ./reference/*.html: A directory of reference materials. These are the compressed learnings from the lessons - cheat sheets, reference algorithms, syntax, yoga poses, glossaries. They are the raw units of learning. They should be beautiful documents which print out well, and are designed for quick reference.
  • RESOURCES.md: A list of resources which can be explored to ground your teaching in contextual knowledge, or to acquire knowledge and wisdom. Use the format in RESOURCES-FORMAT.md.
  • ./learning-records/*.md: A directory of learning records, which capture what the user has learned. These are loosely equivalent to architectural decision records in software development - they capture non-obvious lessons and key insights that may need to be revised later, or drive future sessions. These should be used to calculate the zone of proximal development. They are titled 0001-<dash-case-name>.md, where the number increments each time. Use the format in LEARNING-RECORD-FORMAT.md.
  • ./lessons/*.html: A directory of lessons. A lesson is a single, self-contained HTML output that teaches one tightly-scoped thing tied to the mission. This is the primary unit of teaching in this workspace.
  • ./assets/*: Reusable components shared across lessons. See Assets.
  • NOTES.md: A scratchpad for you to jot down user preferences, or working notes.

Philosophy

To learn at a deep level, the user needs three things:

  • Knowledge, captured from high-quality, high-trust resources
  • Skills, acquired through highly-relevant interactive lessons devised by you, based on the knowledge
  • Wisdom, which comes from interacting with other learners and practitioners

Before the RESOURCES.md is well-populated, your focus should be to find high-quality resources which will help the user acquire knowledge. Never trust your parametric knowledge.

Some topics may require more skills than knowledge. Learning more about theoretical physics might be more knowledge-based. For yoga, more skills-based.

Fluency vs Storage Strength

You should be careful to split between two types of learning:

  • Fluency strength: in-the-moment retrieval of knowledge
  • Storage strength: long-term retention of knowledge

Fluency can give the user an illusory sense of mastery, but storage strength is the real goal. Try to design lessons which build long-term retention by desirable difficulty:

  • Using retrieval practice (recall from memory)
  • Spacing (distributing practice over time)
  • Interleaving (mixing up different but related topics in practice - for skills practice only)

Lessons

A lesson is the main thing you produce — the unit in which knowledge and skills reach the user. Each lesson is one self-contained HTML file, saved to ./lessons/ and titled 0001-<dash-case-name>.html where the number increments each time.

A lesson should be beautiful — clean, readable typography and layout — since the user will return to these later to review. Think Tufte.

The lesson should be short, and completable very quickly. Learners' working memory is very small, and we need to stay within it. But each lesson should give the user a single tangible win that they can build on. It should be directly tied to the mission, and should be in the user's zone of proximal development.

If possible, open the lesson file for the user by running a CLI command.

Each lesson should link via HTML anchors to other lessons and reference documents.

Each lesson should recommend a primary source for the user to read or watch. This should be the most high-quality, high-trust resource you found on the topic.

Each lesson should contain a reminder to ask followup questions to the agent. The agent is their teacher, and can assist with anything that's unclear.

Assets

Lessons are built from reusable components, stored in ./assets/: stylesheets, quiz widgets, simulators, diagram helpers — anything a second lesson could reuse.

Reuse is the default, not the exception. Before authoring a lesson, read ./assets/ and build from the components already there. When a lesson needs something new and reusable, write it as a component in ./assets/ and link to it — never inline code a future lesson would duplicate.

A shared stylesheet is the first component every workspace earns: every lesson links it, so the lessons look like one consistent course rather than a pile of one-offs. As the workspace grows, so should the component library.

The Mission

Every lesson should be tied into the mission - the reason that the user is interested in learning about the topic.

If the user is unclear about the mission, or the MISSION.md is not populated, your first job should be to question the user on why they want to learn this.

Failing to understand the mission will mean knowledge acquisition is not grounded in real-world goals. Lessons will feel too abstract. You will have no way of judging what the user should do next.

Missions may change as the user develops more skills and knowledge. This is normal - make sure to update the MISSION.md and add a learning record to capture the change. Confirm with the user before changing the mission.

Zone Of Proximal Development

Each lesson, the user should always feel as if they are being challenged 'just enough'.

The user may specify an exact thing they want to learn. If they don't, figure out their zone of proximal development by:

  • Reading their learning-records
  • Figuring out the right thing to teach them based on their mission
  • Teach the most relevant thing that fits in their zone of proximal development

Knowledge

Lessons should be designed around a skill the user is going to learn. The knowledge in the lesson should be only what's required to acquire that skill. You teach the knowledge first, then get the user to practice the skills via an interactive feedback loop.

Knowledge should first be gathered from trusted resources. Use RESOURCES.md to keep track of them. Lessons should be littered with citations - links to external resources to back up any claim made. This increases the trustworthiness of the lesson.

For acquiring knowledge, difficulty is the enemy. It eats working memory you need for understanding.

Skills

If knowledge is all about acquisition, skills are about durability and flexibility. Make the knowledge stick.

For skill acquisition, difficulty is the tool. Effortful retrieval is what builds storage strength. Skills should be taught through interactive lessons. There are several tools at your disposal:

  • Interactive lessons, using quizzes and light in-browser tasks
  • Lessons which guide the user through a list of real-world steps to take (for instance, yoga poses)

Each of these should be based on a feedback loop, where the user receives feedback on their performance. This feedback loop should be as tight as possible, giving feedback immediately - and ideally automatically.

For quizzes, each answer should be exactly the same number of words (and characters, if possible). Don't give the user any clues about the answer through formatting.

Acquiring Wisdom

Wisdom comes from true real-world interaction - testing your skills outside the learning environment.

When the user asks a question that appears to require wisdom, your default posture should be to attempt to answer - but to ultimately delegate to a community.

A community is a place (online or offline) where the user can test their skills in the real world. This might be a forum, a subreddit, a real-world class (budget permitting) or a local interest group.

You should attempt to find high-reputation communities the user can join. If the user expresses a preference that they don't want to join a community, respect it.

Reference Documents

While creating lessons, you should also create reference documents. Lessons can reference these documents - they are useful for tracking raw units of knowledge useful across lessons.

Lessons will rarely be revisited later - reference documents will be. They should be the compressed essence of the lesson, in a format designed for quick reference.

Some learning topics lend themselves to reference:

  • Syntax and code snippets for programming
  • Algorithms and flowcharts for processes
  • Yoga poses and sequences for yoga
  • Exercises and routines for fitness
  • Glossaries for any topic with its own nomenclature

Glossaries, in particular, are an essential reference. Once one is created, it should be adhered to in every lesson.

NOTES.md

The user will sometimes express preferences of how they want to be taught, or things you should keep in mind. This is the place to record those preferences, so you can refer back to them when designing lessons or working with the user.

将当前对话上下文和代码库理解综合为规格说明书(Spec/PRD),无需额外访谈。通过探索仓库、确定测试边界,按模板撰写并直接发布至项目问题跟踪器,标记为ready-for-agent。
用户要求将讨论内容转化为技术规格说明 需要基于现有对话生成PRD并发布到Issue Tracker
agent/skills/to-spec/SKILL.md
npx skills add Remocn/remocn --skill to-spec -g -y
SKILL.md
Frontmatter
{
    "name": "to-spec",
    "description": "Turn the current conversation into a spec and publish it to the project issue tracker — no interview, just synthesis of what you've already discussed."
}

This skill takes the current conversation context and codebase understanding and produces a spec (you may know this document as a PRD). Do NOT interview the user — just synthesize what you already know.

The issue tracker and triage label vocabulary should have been provided to you — run /setup-matt-pocock-skills if not.

Process

  1. Explore the repo to understand the current state of the codebase, if you haven't already. Use the project's domain glossary vocabulary throughout the spec, and respect any ADRs in the area you're touching.

  2. Sketch out the seams at which you're going to test the feature. Existing seams should be preferred to new ones. Use the highest seam possible. If new seams are needed, propose them at the highest point you can. The fewer seams across the codebase, the better - the ideal number is one.

Check with the user that these seams match their expectations.

  1. Write the spec using the template below, then publish it to the project issue tracker. Apply the ready-for-agent triage label - no need for additional triage.

Problem Statement

The problem that the user is facing, from the user's perspective.

Solution

The solution to the problem, from the user's perspective.

User Stories

A LONG, numbered list of user stories. Each user story should be in the format of:

  1. As an , I want a , so that
1. As a mobile bank customer, I want to see balance on my accounts, so that I can make better informed decisions about my spending

This list of user stories should be extremely extensive and cover all aspects of the feature.

Implementation Decisions

A list of implementation decisions that were made. This can include:

  • The modules that will be built/modified
  • The interfaces of those modules that will be modified
  • Technical clarifications from the developer
  • Architectural decisions
  • Schema changes
  • API contracts
  • Specific interactions

Do NOT include specific file paths or code snippets. They may end up being outdated very quickly.

Exception: if a prototype produced a snippet that encodes a decision more precisely than prose can (state machine, reducer, schema, type shape), inline it within the relevant decision and note briefly that it came from a prototype. Trim to the decision-rich parts — not a working demo, just the important bits.

Testing Decisions

A list of testing decisions that were made. Include:

  • A description of what makes a good test (only test external behavior, not implementation details)
  • Which modules will be tested
  • Prior art for the tests (i.e. similar types of tests in the codebase)

Out of Scope

A description of the things that are out of scope for this spec.

Further Notes

Any further notes about the feature.

将计划、规范或对话拆解为可独立验证的追踪子弹工单,明确依赖关系。支持垂直切片与宽重构策略,通过多轮交互确认粒度后发布至配置的问题追踪器。
用户要求将需求拆分为具体任务 用户提供规格说明或计划需细化执行步骤 需要梳理任务间的阻塞依赖关系
agent/skills/to-tickets/SKILL.md
npx skills add Remocn/remocn --skill to-tickets -g -y
SKILL.md
Frontmatter
{
    "name": "to-tickets",
    "description": "Break a plan, spec, or the current conversation into a set of tracer-bullet tickets, each declaring its blocking edges, published to the configured tracker — edges as text in a local file, or native blocking links on a real tracker."
}

To Tickets

Break a plan, spec, or conversation into a set of tickets — tracer-bullet vertical slices, each declaring the tickets that block it.

The issue tracker and triage label vocabulary should have been provided to you — run /setup-matt-pocock-skills if not.

Process

1. Gather context

Work from whatever is already in the conversation context. If the user passes a reference (a spec path, an issue number or URL) as an argument, fetch it and read its full body and comments.

2. Explore the codebase (optional)

If you have not already explored the codebase, do so to understand the current state of the code. Ticket titles and descriptions should use the project's domain glossary vocabulary, and respect ADRs in the area you're touching.

Look for opportunities to prefactor the code to make the implementation easier. "Make the change easy, then make the easy change."

3. Draft vertical slices

Break the work into tracer bullet tickets.

  • Each slice cuts a narrow but COMPLETE path through every layer (schema, API, UI, tests) — vertical, NOT a horizontal slice of one layer
  • A completed slice is demoable or verifiable on its own
  • Each slice is sized to fit in a single fresh context window
  • Any prefactoring should be done first

Give each ticket its blocking edges — the other tickets that must complete before it can start. A ticket with no blockers can start immediately.

Wide refactors are the exception to vertical slicing. A wide refactor is one mechanical change — rename a column, retype a shared symbol — whose blast radius fans across the whole codebase, so a single edit breaks thousands of call sites at once and no vertical slice can land green. Don't force it into a tracer bullet; sequence it as expand–contract. First expand: add the new form beside the old so nothing breaks. Then migrate the call sites over in batches sized by blast radius (per package, per directory), each batch its own ticket blocked by the expand, keeping CI green batch to batch because the old form still exists. Finally contract: delete the old form once no caller remains, in a ticket blocked by every migrate batch. When even the batches can't stay green alone, keep the sequence but let them share an integration branch that all block a final integrate-and-verify ticket — green is promised only there.

4. Quiz the user

Present the proposed breakdown as a numbered list. For each ticket, show:

  • Title: short descriptive name
  • Blocked by: which other tickets (if any) must complete first
  • What it delivers: the end-to-end behaviour this ticket makes work

Ask the user:

  • Does the granularity feel right? (too coarse / too fine)
  • Are the blocking edges correct — does each ticket only depend on tickets that genuinely gate it?
  • Should any tickets be merged or split further?

Iterate until the user approves the breakdown.

5. Publish the tickets to the configured tracker

Publish the approved tickets. How depends on the tracker /setup-matt-pocock-skills configured — the tickets are the same either way, only the shape of the blocking edges changes:

  • Local files → write one tickets.md in the repo root, all tickets in dependency order (blockers first), each with its "Blocked by" listing the titles it depends on. Use the file template below.
  • A real issue tracker (GitHub, Linear, …) → publish one issue per ticket in dependency order (blockers first) so each ticket's blocking edges can reference real identifiers. Use the platform's native blocking / sub-issue relationship where it has one; otherwise set each ticket's "Blocked by" to the blocking issues. Apply the ready-for-agent triage label unless instructed otherwise — the tickets are agent-grabbable by construction.

Do NOT close or modify any parent issue.

Tickets:

A one-line summary of what these tickets build. Reference the source spec if there is one.

Work the frontier: any ticket whose blockers are all done. For a purely linear chain that means top to bottom.

<Ticket title>

What to build: the end-to-end behaviour this ticket makes work, from the user's perspective — not a layer-by-layer implementation list.

Blocked by: the titles of the tickets that gate this one, or "None — can start immediately".

  • Acceptance criterion 1
  • Acceptance criterion 2

<Ticket title>

...

Parent

A reference to the parent issue on the tracker (if the source was an existing issue, otherwise omit this section).

What to build

The end-to-end behaviour this ticket makes work, from the user's perspective — not layer-by-layer implementation.

Acceptance criteria

  • Criterion 1
  • Criterion 2

Blocked by

  • A reference to each blocking ticket, or "None — can start immediately".

In either form, avoid specific file paths or code snippets — they go stale fast. Exception: if a prototype produced a snippet that encodes a decision more precisely than prose can (state machine, reducer, schema, type shape), inline it and note briefly that it came from a prototype. Trim to the decision-rich parts — not a working demo, just the important bits.

Work the frontier one ticket at a time with /implement, clearing context between tickets.

通过状态机管理Issue和PR的审查流程,涵盖分类、验证及生成Agent就绪简报。支持按自然语言指令查询待处理项、推进状态或指定任务,确保所有输出包含AI免责声明。
用户输入 /triage 命令 请求查看待处理的 Issue 或 PR 要求移动特定 Issue/PR 的状态 询问哪些任务已准备好供 Agent 处理
agent/skills/triage/SKILL.md
npx skills add Remocn/remocn --skill triage -g -y
SKILL.md
Frontmatter
{
    "name": "triage",
    "description": "Move issues and external PRs through a state machine of triage roles — categorise, verify, grill if needed, and write agent-ready briefs."
}

Triage

Move issues on the project issue tracker through a small state machine of triage roles.

If this repo treats external pull requests as a request surface (see the issue-tracker config), triage covers them too: a PR is an issue with attached code — same roles, same states, same machine, with a few deltas marked "for a PR" below. Resolve a bare #42 to an issue or PR per the tracker config.

Every comment or issue posted to the issue tracker during triage must start with this disclaimer:

> *This was generated by AI during triage.*

Reference docs

Roles

Two category roles:

  • bug — something is broken
  • enhancement — new feature or improvement

Five state roles:

  • needs-triage — maintainer needs to evaluate
  • needs-info — waiting on reporter for more information
  • ready-for-agent — fully specified, ready for an AFK agent
  • ready-for-human — needs human implementation
  • wontfix — will not be actioned

For a PR, the same states read against the attached code: ready-for-agent means a brief is attached and an agent should take the next step on the diff; ready-for-human means it's ready for a human to merge.

Every triaged issue should carry exactly one category role and one state role. If state roles conflict, flag it and ask the maintainer before doing anything else.

These are canonical role names — the actual label strings used in the issue tracker may differ. The mapping should have been provided to you - run /setup-matt-pocock-skills if not.

State transitions: an unlabeled issue normally goes to needs-triage first; from there it moves to needs-info, ready-for-agent, ready-for-human, or wontfix. needs-info returns to needs-triage once the reporter replies. The maintainer can override at any time — flag transitions that look unusual and ask before proceeding.

Invocation

The maintainer invokes /triage and describes what they want in natural language. Interpret the request and act. Examples:

  • "Show me anything that needs my attention"
  • "Let's look at #42" (issue or PR)
  • "Move #42 to ready-for-agent"
  • "What's ready for agents to pick up?"

Show what needs attention

Query the issue tracker and present three buckets, oldest first:

  1. Unlabeled — never triaged.
  2. needs-triage — evaluation in progress.
  3. needs-info with reporter activity since the last triage notes — needs re-evaluation.

When PRs are in scope, include external PRs in these buckets and tag each line [PR] or [issue]. Discovery surfaces only external PRs (the tracker config defines who counts as external) — a collaborator's in-flight PR is not triage work. This filter is discovery-only; an explicitly named PR is always triaged regardless of author.

Show counts and a one-line summary per item. Let the maintainer pick.

Triage a specific issue or PR

  1. Gather context. Read the full issue or PR (body, comments, labels, author, dates; for a PR, the diff too). Parse any prior triage notes so you don't re-ask resolved questions. Explore the codebase using the project's domain glossary, respecting ADRs in the area. Run two checks against the codebase: (a) redundancy — search for an existing implementation of the requested behavior by domain concept (not just the request's wording), and report where you looked. If found, it's an already-implemented wontfix (step 5). (b) prior rejection — read .out-of-scope/*.md and surface any that resembles this request.

  2. Recommend. Tell the maintainer your category and state recommendation with reasoning, plus a brief codebase summary relevant to the request — including whether it's already implemented. Wait for direction.

  3. Verify the claim. Before any grilling, check that the claim holds up. For a bug, reproduce it from the reporter's steps. For a PR, confirm the diff does what it claims — check it out, run the relevant tests or commands. Report what happened: confirmed (with code path), failed, or insufficient detail (a strong needs-info signal). A confirmed verification makes a much stronger agent brief.

  4. Grill (if needed). If the request needs fleshing out, run the /grilling and /domain-modeling skills together — grill it into shape one question at a time, sharpening domain terms and updating CONTEXT.md/ADRs inline as decisions land.

  5. Apply the outcome:

    • ready-for-agent — post an agent brief comment (AGENT-BRIEF.md).
    • ready-for-human — same structure as an agent brief, but note why it can't be delegated (judgment calls, external access, design decisions, manual testing).
    • needs-info — post triage notes (template below).
    • wontfix — close, with the comment depending on why:
      • Already implemented — the change already exists in the codebase. Point to where it lives; do not write to .out-of-scope/ (that KB is for rejected requests, not built ones).
      • Rejected (bug) — polite explanation, then close.
      • Rejected (enhancement) — write to .out-of-scope/, link to it from a comment, then close (OUT-OF-SCOPE.md).
    • needs-triage — apply the role. Optional comment if there's partial progress.

Quick state override

If the maintainer says "move #42 to ready-for-agent", trust them and apply the role directly. Confirm what you're about to do (role changes, comment, close), then act. Skip grilling. If moving to ready-for-agent without a grilling session, ask whether they want to write an agent brief.

Needs-info template

## Triage Notes

**What we've established so far:**

- point 1
- point 2

**What we still need from you (@reporter):**

- question 1
- question 2

Capture everything resolved during grilling under "established so far" so the work isn't lost. Questions must be specific and actionable, not "please provide more info".

Resuming a previous session

If prior triage notes exist on the issue or PR, read them, check whether the reporter has answered any outstanding questions, and present an updated picture before continuing. Don't re-ask resolved questions.

从对话中提取DDD风格领域术语,消除歧义并建立统一词汇表。当用户要求定义领域术语、构建词表或提及DDD时触发。该技能会扫描概念、识别同义词与多义词,输出规范的UBIQUITOUS_LANGUAGE.md文件及摘要,确保领域专家与开发者的语言一致。
用户想要定义领域术语 用户想要构建术语词表 用户想要强化术语一致性 用户想要创建通用语言 用户提及“domain model” 用户提及“DDD”
agent/skills/ubiquitous-language/SKILL.md
npx skills add Remocn/remocn --skill ubiquitous-language -g -y
SKILL.md
Frontmatter
{
    "name": "ubiquitous-language",
    "description": "Extract a DDD-style ubiquitous language glossary from the current conversation, flagging ambiguities and proposing canonical terms. Saves to UBIQUITOUS_LANGUAGE.md. Use when user wants to define domain terms, build a glossary, harden terminology, create a ubiquitous language, or mentions \"domain model\" or \"DDD\"."
}

Ubiquitous Language

Extract and formalize domain terminology from the current conversation into a consistent glossary, saved to a local file.

Process

  1. Scan the conversation for domain-relevant nouns, verbs, and concepts
  2. Identify problems:
    • Same word used for different concepts (ambiguity)
    • Different words used for the same concept (synonyms)
    • Vague or overloaded terms
  3. Propose a canonical glossary with opinionated term choices
  4. Write to UBIQUITOUS_LANGUAGE.md in the working directory using the format below
  5. Output a summary inline in the conversation

Output Format

Write a UBIQUITOUS_LANGUAGE.md file with this structure:

# Ubiquitous Language

## Order lifecycle

| Term        | Definition                                              | Aliases to avoid      |
| ----------- | ------------------------------------------------------- | --------------------- |
| **Order**   | A customer's request to purchase one or more items      | Purchase, transaction |
| **Invoice** | A request for payment sent to a customer after delivery | Bill, payment request |

## People

| Term         | Definition                                  | Aliases to avoid       |
| ------------ | ------------------------------------------- | ---------------------- |
| **Customer** | A person or organization that places orders | Client, buyer, account |
| **User**     | An authentication identity in the system    | Login, account         |

## Relationships

- An **Invoice** belongs to exactly one **Customer**
- An **Order** produces one or more **Invoices**

## Example dialogue

> **Dev:** "When a **Customer** places an **Order**, do we create the **Invoice** immediately?"
> **Domain expert:** "No — an **Invoice** is only generated once a **Fulfillment** is confirmed. A single **Order** can produce multiple **Invoices** if items ship in separate **Shipments**."
> **Dev:** "So if a **Shipment** is cancelled before dispatch, no **Invoice** exists for it?"
> **Domain expert:** "Exactly. The **Invoice** lifecycle is tied to the **Fulfillment**, not the **Order**."

## Flagged ambiguities

- "account" was used to mean both **Customer** and **User** — these are distinct concepts: a **Customer** places orders, while a **User** is an authentication identity that may or may not represent a **Customer**.

Rules

  • Be opinionated. When multiple words exist for the same concept, pick the best one and list the others as aliases to avoid.
  • Flag conflicts explicitly. If a term is used ambiguously in the conversation, call it out in the "Flagged ambiguities" section with a clear recommendation.
  • Only include terms relevant for domain experts. Skip the names of modules or classes unless they have meaning in the domain language.
  • Keep definitions tight. One sentence max. Define what it IS, not what it does.
  • Show relationships. Use bold term names and express cardinality where obvious.
  • Only include domain terms. Skip generic programming concepts (array, function, endpoint) unless they have domain-specific meaning.
  • Group terms into multiple tables when natural clusters emerge (e.g. by subdomain, lifecycle, or actor). Each group gets its own heading and table. If all terms belong to a single cohesive domain, one table is fine — don't force groupings.
  • Write an example dialogue. A short conversation (3-5 exchanges) between a dev and a domain expert that demonstrates how the terms interact naturally. The dialogue should clarify boundaries between related concepts and show terms being used precisely.

Example dialogue

Dev: "How do I test the sync service without Docker?"

Domain expert: "Provide the filesystem layer instead of the Docker layer. It implements the same Sandbox service interface but uses a local directory as the sandbox."

Dev: "So sync-in still creates a bundle and unpacks it?"

Domain expert: "Exactly. The sync service doesn't know which layer it's talking to. It calls exec and copyIn — the filesystem layer just runs those as local shell commands."

Re-running

When invoked again in the same conversation:

  1. Read the existing UBIQUITOUS_LANGUAGE.md
  2. Incorporate any new terms from subsequent discussion
  3. Update definitions if understanding has evolved
  4. Re-flag any new ambiguities
  5. Rewrite the example dialogue to incorporate new terms
用于规划超出单次会话范围的大型工作。通过创建共享地图(Issue Tracker上的主Issue)将任务拆解为调查票据,逐一解决决策直至路径清晰。默认侧重规划而非执行,强调以名称引用票据并维护决策索引。
面对模糊且庞大的目标需要制定探索计划时 需要将大型工作分解为可管理的调查步骤时
agent/skills/wayfinder/SKILL.md
npx skills add Remocn/remocn --skill wayfinder -g -y
SKILL.md
Frontmatter
{
    "name": "wayfinder",
    "description": "Plan a huge chunk of work — more than one agent session can hold — as a shared map of investigation tickets on your issue tracker, and resolve them one at a time until the way to the destination is clear."
}

A loose idea has arrived — too big for one agent session, and wrapped in fog: the way from here to the destination isn't visible yet. Wayfinding is about finding that way, not charging at the destination. This skill charts the way as a shared map on the repo's issue tracker, then works its tickets one at a time until the route is clear.

The destination varies per effort, and naming it is the first act of charting — it shapes every ticket. It might be a spec to hand off and iterate on, a decision to lock before planning starts, or a change made in place like a data-structure migration. The map is domain-agnostic — engineering work, course content, whatever fits the shape.

Plan, don't do

Wayfinder is planning by default: each ticket resolves a decision, and the map is done when the way is clear — nothing left to decide before someone goes and does the thing. The pull to just do the work is usually the signal you've reached the edge of the map and it's time to hand off. An effort can override this in its Notes — carrying execution into the map itself — but absent that, produce decisions, not deliverables.

Refer by name

Every map and ticket is an issue, so it has a name — its title. In everything the human reads — narration, the map's Decisions-so-far — refer to it by that name, never by a bare id, number, or slug. A wall of #42, #43, #44 is illegible; names read at a glance. The id and URL don't vanish — a name wraps its link — but they ride inside the name, never stand in for it.

The Map

The map is a single issue on this repo's issue tracker, labelled wayfinder:map — the canonical artifact. Its tickets are child issues of the map.

The map is an index, not a store. It lists the decisions made and points at the tickets that hold their detail; a decision lives in exactly one place — its ticket — so the map never restates it, only gists it and links.

Where the map, its child tickets, blocking, and frontier queries physically live is tracker-specific. The issue tracker should have been provided to you — run /setup-matt-pocock-skills if not. Consult the tracker doc's "Wayfinding operations" section for how this repo expresses them. If no tracker has been provided, default to the local-markdown tracker.

The map body

The whole map at low resolution, loaded once per session. Open tickets are not listed — they are open child issues, found by query.

## Destination

<what reaching the end of this map looks like — the spec, decision, or change this effort is finding its way to. One or two lines; every session orients to it before choosing a ticket.>

## Notes

<domain; skills every session should consult; standing preferences for this effort>

## Decisions so far

<!-- the index — one line per closed ticket: enough to judge relevance, then zoom the link for the detail the ticket holds -->

- [<closed ticket title>](link) — <one-line gist of the answer>

## Not yet specified

<!-- see "Fog of war": in-scope fog you can't ticket yet; graduates as the frontier advances -->

## Out of scope

<!-- see "Out of scope": work ruled beyond the destination; closed, never graduates -->

Tickets

Each ticket is a child issue of the map; the tracker's issue id is its identity. Its body is the question, sized to one 100K token agent session:

## Question

<the decision or investigation this ticket resolves>

Each ticket carries a wayfinder:<type> label — one of research, prototype, grilling, task (see Ticket Types).

A session claims a ticket by assigning it to the dev driving the map, first, before any work, so concurrent sessions skip it. That assignee is the claim: an open, unassigned ticket is unclaimed.

Blocking uses the tracker's native dependency relationship — essential because it renders the frontier visually in the tracker's own UI, so the human sees what's takeable without opening the map. Only a tracker that lacks native blocking falls back to a body convention. A ticket is unblocked when every ticket blocking it is closed; the frontier is the open, unblocked, unclaimed children — the edge of the known.

The answer isn't part of the body — it's recorded on resolution (see Work through the map). Assets created while resolving a ticket are linked from the issue, not pasted in.

Ticket Types

Every ticket is either HITL — human in the loop, worked with a human who speaks for themselves — or AFK, driven by the agent alone. A HITL ticket only resolves through that live exchange; the agent never stands in for the human's side of it (a grilling agent that answers its own questions has broken this).

  • Research (AFK): Reading documentation, third-party APIs, or local resources like knowledge bases. Creates a markdown summary as a linked asset. Use when knowledge outside the current working directory is required.
  • Prototype (HITL): Raise the fidelity of the discussion by making a cheap, rough, concrete artifact to react to — an outline, a rough take, a stub, or UI/logic code via the /prototype skill. Links the prototype as an asset. Use when "how should it look" or "how should it behave" is the key question.
  • Grilling (HITL): Conversation via the /grilling and /domain-modeling skills, one question at a time. The default case.
  • Task (HITL or AFK): Manual work that must happen before a decision can be made — nothing to decide, prototype, or research, but the discussion is blocked until it's done. Signing up for a service so its API can be judged, provisioning access, moving data so its shape can be seen. This is the one type that does rather than decides — and it earns its place by unblocking a decision, not by delivering the destination. The agent drives it alone where it can (AFK); otherwise it hands the human a precise checklist (HITL). Resolved when the work is done; the answer records what was done and any resulting facts (credentials location, new URLs, row counts) later tickets depend on.

Fog of war

The map is deliberately incomplete: don't chart what you can't yet see. Beyond the live tickets lies the fog of war — the dim view of decisions and investigations you can tell are coming but can't yet pin down, because they hang on questions still open. Resolving a ticket clears the fog ahead of it, graduating whatever's now specifiable into fresh tickets — one at a time, until the way to the destination is clear and no tickets remain.

The map's Not yet specified section is where that dim view is written down: the suspected question, the area to revisit later. It's the undiscovered frontier toward the destination — everything here is in scope, just not sharp enough to ticket. Write as loosely or as fully as the view allows; it doubles as a signpost for collaborators reading where the effort is headed.

Fog or ticket? The test is whether you can state the question precisely now — not whether you can answer it now.

  • Ticket when the question is already sharp — even if it's blocked and you can't act on it yet.
  • Not yet specified when you can't yet phrase it that sharply. Don't pre-slice the fog into ticket-sized pieces: it's coarser than a ticket, and one patch may graduate into several tickets, or none, once the frontier reaches it.

Not yet specified excludes what's already decided (Decisions so far), what's already a live ticket, and what's out of scope (the next section).

Out of scope

Fog only ever gathers toward the destination. The destination fixes the scope, so work beyond it is out of scope — it isn't fog, and it doesn't belong in Not yet specified. It gets its own Out of scope section on the map: work you've consciously ruled out of this effort. Scope, not sharpness, lands it here.

Out-of-scope work never graduates — the frontier stops at the destination — so it returns only if the destination is redrawn, and then as a fresh effort, not a resumption.

Ruling something out of scope is a scoping act, not a step on the route. When a ticket that already exists turns out to sit past the destination — mis-scoped in while charting, or exposed by a resolution — close it (a closed ticket is unambiguously off the frontier) and leave one line in the Out of scope section: the gist plus why it's out of scope, linking the closed ticket. It stays out of Decisions so far, which records the route actually walked — a scope boundary isn't a step on it.

Invocation

Two modes. Either way, never resolve more than one ticket per session.

Chart the map

User invokes with a loose idea.

  1. Name the destination. Run a /grilling and /domain-modeling session to pin down what this map is finding its way to — the spec, decision, or change. The destination fixes the scope, so it's settled first.
  2. Map the frontier. Grill again, breadth-first this time: fan out across the whole space rather than deep on any one thread, surfacing the open decisions and the first steps takeable now. If this surfaces no fog — the way to the destination is already clear, the whole journey small enough for one session — you don't need a map. Stop and ask the user how they'd like to proceed.
  3. Create the map (label wayfinder:map): Destination and Notes filled in, Decisions-so-far empty, the fog sketched into Not yet specified.
  4. Create the tickets you can specify now as child issues of the map — then wire blocking edges in a second pass (issues need ids before they can reference each other). Wiring sorts them into the frontier and the blocked; everything you can't yet specify stays in the fog — the Not yet specified section.
  5. Stop — charting the map is one session's work; do not also resolve tickets.

Work through the map

User invokes with a map (URL or number). A ticket is optional — without one, you pick the next decision, not the user.

  1. Load the map — the low-res view, not every ticket body.
  2. Choose the ticket. If the user named one, use it. Otherwise take the first frontier ticket in order. Claim it: assign it to yourself before any work.
  3. Resolve it — zoom as needed: fetch the full body of any related or closed ticket on demand; invoke the skills the ## Notes block names. If in doubt, use /grilling and /domain-modeling.
  4. Record the resolution: post the answer as a resolution comment, close the issue, and append a context pointer to the map's Decisions-so-far.
  5. Add newly-surfaced tickets (create-then-wire); graduate any fog the answer has made specifiable, clearing each graduated patch from Not yet specified so it lives only as its new ticket. If the answer reveals a ticket — this one or another — sits beyond the destination, rule it out of scope rather than resolving it on the route. If the decision invalidates other parts of the map, update or delete those tickets.

The user may run unblocked tickets in parallel, so expect other sessions to be editing the tracker concurrently.

生成交互式 Bash 向导脚本,引导用户逐步完成第三方配置、迁移或状态转换。自动处理 URL 打开、值捕获、步骤确认及 .env/GitHub Secrets 写入,提供带进度和剩余时间的友好 UX。
需要手动配置第三方服务 执行一次性数据迁移 进行 A 到 B 的状态转换 自动化繁琐的重复性设置流程
agent/skills/wizard/SKILL.md
npx skills add Remocn/remocn --skill wizard -g -y
SKILL.md
Frontmatter
{
    "name": "wizard",
    "description": "Generate an interactive bash wizard that walks a human through a manual procedure — third-party setup, a one-off migration, an A→B state transition — opening URLs, capturing values, confirming each step, and writing .env files and GitHub Actions secrets."
}

Wizard

A wizard is a bash script that walks a human, step by step, through a manual procedure that's tedious to do by hand and tedious to re-explain to an AI every time. It opens each URL, says exactly what to click and copy, captures the values, writes them where they belong (.env, GitHub secrets), confirms at every stage, and shows how much is left. It might configure third-party services, run a one-off migration, or move the project from one state to another.

The delightful UX is already solved by template.sh — progress with time-remaining, confirmation gates, cross-platform URL opening (including WSL), hidden secret entry, idempotent .env upserts, gh secret/gh variable writes, and a closing summary. Your job is only to scope the procedure and author its stages. The library above the STAGES marker is identical in every wizard; that consistency is the point — never hand-edit it.

A wizard is ephemeral by default — built for one run, saved to a scratch or scripts/ path, deleted when the job's done. Commit it only when the user wants a repeatable setup path that should live in the repo.

Process

1. Scope the procedure

Work out every manual step the human must take and every value that gets captured along the way. Read the repo first — don't ask cold:

  • For setup: .env, .env.example, .env.*, README, docker-compose*, framework config, and .github/workflows/* (every secrets.* / vars.* reference is a value the wizard must produce).
  • For a migration or transition: the current state, the target state, and the irreversible actions between them.

Then show the user the ordered list of stages and the values each produces, and confirm — they may add, drop, or reorder.

Done when: every stage is named in order, and for each captured value you know (a) where the human gets it, (b) where it's written (.env, a GitHub secret, both, or nowhere — some stages are pure actions), and (c) whether it's secret (hidden entry) or public.

2. Map each stage's journey

For each stage, write the precise path a human follows: which URL to open, what to do there, where a value is shown, which variable it fills — e.g. "Dashboard → Developers → API keys → Reveal test key → copy". Where you don't actually know the current UI or the exact command, say so and ask the user or check the docs — never invent steps that may not exist.

Done when: every stage traces to concrete instructions a stranger could follow.

3. Author the wizard

Copy template.sh to the target path. Replace the example stage with one stage per step, in dependency order. Use the library helpers — stage, say/step, open_url, ask/ask_secret, write_env, set_secret/set_var, pause/confirm — and set TOTAL_STAGES and TOTAL_MINUTES to honest estimates (this drives the time-remaining display).

Hold the bar the template sets: open the URL before asking for its value, use ask_secret for anything secret, write_env every persisted value, set_secret only the values CI actually needs, and confirm before any irreversible action. Each stage clears the screen so only the current step is visible — keep a stage to one focused task so nothing the human needs scrolls away. Don't touch the library above the marker.

4. Verify and hand off

  • bash -n <script>; run shellcheck if available.
  • chmod +x <script>.
  • Don't run it end-to-end yourself — it opens browsers and blocks on human input. Trace it statically instead: every value from step 1 is captured and lands where step 1 said, and every set_secret name exactly matches a secrets.* reference in CI.
  • Tell the user how to run it. If it's a repeatable setup path, commit it and link it from the README so the next person runs the script instead of asking an AI.
该技能用于将原始素材转化为结构化的写作节拍。通过交互式选择,逐步构建文章,确保每个概念在后续使用前已被充分铺垫(Grounding)。用户选定起始点后,逐个撰写并确认内容,直至文章自然结束。
用户提供包含原始素材的Markdown文件 需要按照特定逻辑和节奏撰写长篇文章
agent/skills/writing-beats/SKILL.md
npx skills add Remocn/remocn --skill writing-beats -g -y
SKILL.md
Frontmatter
{
    "name": "writing-beats",
    "description": "Writing, exploit — assemble raw material into a journey of beats, grounding each term before a beat leans on it."
}

The user has passed (or will pass) a markdown file of raw material. This is exploit: the exploring is done, the pile is fixed — commit to a path through it and mine the pile to fill each beat.

If the user did not say where to save the article, ask once and remember the path.

Then run a beat-by-beat journey, choose-your-own-adventure style:

  1. Establish the prerequisites. Before any beats, settle with the user what the audience already knows walking in — the concepts that are grounded from the start. Everything else must be grounded by a beat before a later beat can use it. See Grounding.
  2. Write 2–3 candidate starting beats, drawn from the raw material. Each is a different entry point into the article. Each may only lean on grounded concepts; note what new concepts each one grounds. Show the user the beats before writing to the article file. The user picks one. Preview what beats that pick unlocks — as if the user is seeing a little way down the path.
  3. Once the user picks a starting beat, write only that beat to the article file. A beat may be one sentence or several paragraphs — whatever that beat naturally is. Stop there.
  4. Re-read the article file from disk. Then offer 2–3 candidate next beats — different directions the journey could pivot to from where the article now stands. Each must be reachable from the current grounded set; note what each one grounds.
  5. Loop steps 3–5 until the article reaches a natural end.

Grounding

Every concept has to be grounded before a beat can lean on it: the audience either walked in knowing it or met it in an earlier beat. A beat that reaches for an ungrounded concept loses the reader — that is the one move the journey can't make. The unit is the concept, not the word for it: a beat can lean on an idea the reader lacks even with no jargon in sight. Where a concept has a name — a term — grounding it means landing the idea and the term together.

A concept gets grounded one of two ways:

  • Prerequisite — grounded before the first beat. The audience brings it. Fixed at the start.
  • Introduced — a beat establishes it, and from then on it's grounded for every later beat.

So each beat does two jobs: it requires concepts that are already grounded, and it grounds new ones. Keep a running list of what's grounded so far, and update it each time a beat lands.

This is what shapes the choose-your-own-adventure. A candidate beat is only reachable if everything it requires is already grounded; picking a beat that grounds concept X unlocks every beat that was waiting on X. When you offer next beats, they must all be reachable from the current grounded set — and say what each one grounds, so the user can see which paths it opens.

The big lever is what you make a prerequisite versus what you ground inside the piece. Demand too much up front and you shut out readers who don't have it; ground too much inside and the early beats drown in definitions. Settle this with the user when you establish prerequisites, and revisit it whenever a tempting beat turns out to require a concept nothing has grounded yet — the fix is either a grounding beat before it, or promoting the concept to a prerequisite.

What is a beat

A beat is one move in the journey. It does one thing — sets a scene, lands a point, asks a question, drops an aside, twists the angle. Then it stops, leaving the reader at a place where the next beat can pivot.

A beat is sized by what it needs:

  • A single sentence if that's all the move is ("And then nothing happened for three weeks.").
  • A short paragraph if the move needs setup.
  • Multiple paragraphs if the beat is a self-contained vignette, argument, or example.

If a "beat" needs five paragraphs and three subheadings, it's not a beat — it's two beats glued together. Split it.

Pulling from the pile

Pull material from the raw pile to populate each beat. You can paraphrase, split, recombine, or quote. The pile is a quarry.

Ending the journey

The article ends when the journey is complete — not when the pile is empty. Most piles will have leftover fragments that don't make it in. That is fine; that is the point of having more raw material than you need.

Writing rhythm

  • Append one beat at a time. Never write ahead.
  • Re-read the article file from disk before every write. Preserve user edits absolutely.
  • If the user edits a previous beat substantially, let it change what comes next.
  • If the user says "rewrite that beat" or "go back and try a different beat 3", do it — edit in place, leave the rest alone.
用于写作探索阶段的技能,通过深度访谈挖掘原始写作片段。不构建结构,仅记录可读性强、异构的碎片化内容(如金句、观察、隐喻),旨在为后续结构化写作积累素材。
用户希望进行头脑风暴或收集写作灵感 需要生成未经整理的原始写作素材
agent/skills/writing-fragments/SKILL.md
npx skills add Remocn/remocn --skill writing-fragments -g -y
SKILL.md
Frontmatter
{
    "name": "writing-fragments",
    "description": "Writing, explore — mine raw fragments, no structure yet."
}

This is pure explore: widen the space of what could be written without committing to structure — committing is exploit, a separate skill's job. Run a grilling session that produces fragments, interviewing the user relentlessly about whatever they want to write about. Imposing phases, outlines, or article structure is out of scope here.

As fragments emerge from either side of the conversation, append them to a single markdown file.

If the user did not pass a path, ask once where to save the document, then remember it for the rest of the session.

Capture fragments from the very first thing the user says, including the initial prompt.

On first write, put a single H1 at the top with a working title (it can change later) and nothing else — no metadata, no TOC, no date.

What is a fragment

A fragment is any piece of text that might survive into the final article. It must be readable by the author — the author can tell what it means — but it does not need to define its terms or be comprehensible to a cold reader. The bar is "is this a piece of good writing?", not "is this a self-contained argument?"

Fragments are deliberately heterogeneous. Examples of what could be a fragment:

  • A sharp sentence you'd want to deploy somewhere but don't yet know where.
  • A claim with a one-line justification.
  • A vignette: a thing that happened, a code snippet, a scenario, an analogy.
  • A half-thought: "something about how X feels like Y, work this out later."
  • A quote, a piece of dialogue, an overheard line.
  • A list of related observations that hang together by feel.
  • A complaint, a confession, a punchline.
  • A leading word — a compact metaphor or coinage the whole piece can hang on (one term that names the idea, the way tracer bullets or fog of war names a whole pattern).

Of these, the leading word is the most valuable fragment to land. It is load-bearing: name the right one in explore and it shapes the structure, the transitions, and the title later — paying dividends through the entire exploit phase. When the conversation circles a recurring idea, push to coin a word for it.

The novelist's diary is the model: years of unstructured noticings that later get mined for raw material. Fragments are noticings.

File format

# Working title

A first fragment lives here.

It can be multiple paragraphs. It can include lists, code, quotes — whatever
shape the fragment naturally takes.

---

A second fragment.

---

> A quoted line that the user wants to keep around.

A reaction to it.

---

- A cluster of related observations
- That hang together by feel
- And want to be near each other

Fragments are separated by a horizontal rule (\n---\n). No headings inside the body. No tags. No order beyond the order they were added.

Writing rhythm

Append silently. Don't ask permission for each fragment. Mention what you added in passing ("adding that"), but don't interrupt the conversation with save dialogs.

Before every write: re-read the file from disk. The user may have edited, reordered, or deleted fragments between turns — preserve their changes. Never overwrite the file; only append (or, if the user asks, edit a specific fragment in place).

The user can say "cut the last one", "rewrite that one sharper", "merge those two" at any time. Treat those as first-class instructions.

提供编写高质量Agent Skill的规范,核心在于通过预测性控制随机系统。详解模型调用与用户调用的权衡、描述词的精简原则及信息层级结构,旨在提升Skill的可控性与执行效率。
需要编写新的Agent Skill 优化现有Skill的描述或结构 解决Skill触发不可预测的问题
agent/skills/writing-great-skills/SKILL.md
npx skills add Remocn/remocn --skill writing-great-skills -g -y
SKILL.md
Frontmatter
{
    "name": "writing-great-skills",
    "description": "Reference for writing and editing skills well — the vocabulary and principles that make a skill predictable."
}

A skill exists to wrangle determinism out of a stochastic system. Predictability — the agent taking the same process every run, not producing the same output — is the root virtue; every lever below serves it.

Bold terms are defined in GLOSSARY.md; look them up there for the full meaning.

Invocation

Two choices, trading different costs:

  • A model-invoked skill keeps a description, so the agent can fire it autonomously and other skills can reach it (you can still type its name too). It contributes to context load — the description sits in the window every turn. Mechanics: omit disable-model-invocation, and write a model-facing description with rich trigger phrasing ("Use when the user wants…, mentions…").
  • A user-invoked skill strips the description from the agent's reach: only you, typing its name, can invoke it — and no other skill can. Zero context load, but it spends cognitive load: you are the index that must remember it exists. Mechanics: set disable-model-invocation: true; the description becomes human-facing — a one-line summary, trigger lists stripped.

Pick model-invocation only when the agent must reach the skill on its own, or another skill must. If it only ever fires by hand, make it user-invoked and pay no context load.

When user-invoked skills multiply past what you can remember, that piled-up cognitive load is cured by a router skill: one user-invoked skill that names the others and when to reach for each.

Writing the description

A model-invoked description does two jobs — state what the skill is, and list the branches that should trigger it. Every word increases context load, so a description earns even harder pruning than the body:

  • Front-load the skill's leading word — the description is where it does its invocation work.
  • One trigger per branch. Synonyms that rename a single branch are duplication — "build features using TDD … asks for test-first development" is one branch written twice. Collapse them; keep only genuinely distinct branches.
  • Cut identity that's already in the body. Keep the description to triggers, plus any "when another skill needs…" reach clause.

Information hierarchy

A skill is built from two content types — steps and reference — that mix freely: a skill can be all steps, all reference, or both. The core decision is which to use and where each sits on the information hierarchy, a ladder ranked by how immediately the agent needs the material:

  1. In-skill step — an ordered action in SKILL.md, the primary tier: what the agent does, in order. Each step ends on a completion criterion, the condition that tells the agent the work is done. Make it checkable (can the agent tell done from not-done?) and, where it matters, exhaustive ("every modified model accounted for", not "produce a change list") — a vague criterion invites premature completion.
  2. In-skill reference — a definition, rule, or fact in SKILL.md, consulted on demand. Often a legitimately flat peer-set (every rule of a review on one rung) — a fine arrangement, not a smell. This skill is all reference.
  3. External reference — reference pushed out of SKILL.md into a separate file, reached by a context pointer, loaded only when the pointer fires. (Spans disclosed reference — a sibling file like GLOSSARY.md, still part of the skill — through fully external reference that lives outside the skill system and any skill can point at.)

A demanding completion criterion drives thorough legwork — the digging the agent does within the work — whether the skill has steps or not, since "every rule applied" binds flat reference just as "every step done" binds a sequence.

Push too little down and the top bloats; push too much and you hide material the agent actually needs. That tension is the whole decision.

Progressive disclosure is the move down the ladder — out of SKILL.md into a linked file — so the top stays legible. Mechanics: a linked .md file in the skill folder, named for what it holds (this skill discloses its full definitions to GLOSSARY.md). Some skills are used in more than one way, and each distinct way is a branch — different runs taking different paths through the skill. Branching is the cleanest disclosure test: inline what every branch needs, and push behind a pointer what only some branches reach. A context pointer's wording, not its target, decides when and how reliably the agent reaches the material.

Where the ladder decides how far down a piece sits, co-location decides what sits beside it once there: keep a concept's definition, rules, and caveats under one heading rather than scattered, so reading one part brings its neighbours with it.

When to split

Granularity is how finely you divide skills, and each cut spends one of the two loads, so split only when the cut earns it. Two cuts:

  • By invocation — split off a model-invoked skill when you have a distinct leading word that should trigger it on its own, or another skill must reach it. You pay context load for the new always-loaded description, so that independent reach has to be worth it.
  • By sequence — split a run of steps when the steps still ahead (a step's post-completion steps) tempt the agent to rush the one in front of it (premature completion). Keeping them out of view encourages the agent to do more legwork on the current task.

Pruning

Keep each meaning in a single source of truth: one authoritative place, so changing the behaviour is a one-place edit.

Check every line for relevance: does it still bear on what the skill does?

Then hunt no-ops sentence by sentence, not just line by line: run the no-op test on each sentence in isolation, and when one fails, delete the whole sentence rather than trim words from it. Be aggressive — most prose that fails should go, not be rewritten.

Leading words

A leading word is a compact concept already living in the model's pretraining that the agent thinks with while running the skill (e.g. lesson, fog of war, tracer bullets). Repeated throughout the text (though not necessarily - a strong leading word might only be needed once), it accumulates a distributed definition and anchors a whole region of behaviour in the fewest tokens, by recruiting priors the model already holds.

It serves predictability twice. In the body it anchors execution: the agent reaches for the same behaviour every time the word appears. In the description it anchors invocation: when the same word lives in your prompts, docs, and code, the agent links that shared language to the skill and fires it more reliably.

Hunt for opportunities to refactor skills to use leading words. A triad spelled out at three sites (duplication), a description spending a sentence to gesture at one idea — each is a passage begging to collapse into a single token. Examples include:

  • "fast, deterministic, low-overhead" -> tight — one quality restated across a phase — into a single pretrained word (a tight loop).
  • "a loop you believe in" -> red — converts a fuzzy gate into a binary observable state (the loop goes red on the bug, or it doesn't).

You win twice over: fewer tokens, and a sharper hook for the agent to hang its thinking on. Assume every skill is carrying restatements that leading words retire — go find them.

Failure modes

Use these to diagnose issues the user may be having with the skill.

  • Premature completion — ending a step before it's genuinely done, attention slipping to being done. Defence, in order: sharpen the completion criterion first (cheap, local); only if it is irreducibly fuzzy and you observe the rush, hide the post-completion steps by splitting (the sequence cut).
  • Duplication — the same meaning in more than one place. Costs maintenance and tokens, and inflates a meaning's prominence on the ladder past its real rank.
  • Sediment — stale layers that settle because adding feels safe and removing feels risky. The default fate of any skill without a pruning discipline.
  • Sprawl — a skill simply too long, even when every line is live and unique. Hurts readability and maintainability and wastes tokens. The cure is the ladder: disclose reference behind pointers, and split by branch or sequence so each path carries only what it needs.
  • No-op — a line the model already obeys by default, so you pay load to say nothing. The test: does it change behaviour versus the default? A weak leading word (be thorough when the agent is already thorough-ish) is a no-op; the fix is a stronger word (relentless), not a different technique.
  • Negation — steering by prohibition backfires: don't think of an elephant names the elephant and makes it more available, not less. Prompt the positive — state the target behaviour so the banned one is never spoken; keep a prohibition only as a hard guardrail you can't phrase positively, and even then pair it with what to do instead.
将原始素材转化为结构化文章。先通读材料,确立读者前置知识,提供多个开篇供选。随后逐段写作并即时保存,确保概念逻辑连贯(Grounding),每次只写一个段落直至完成。
用户传入包含原始素材的Markdown文件 需要将碎片化或杂乱文本整理为正式文章
agent/skills/writing-shape/SKILL.md
npx skills add Remocn/remocn --skill writing-shape -g -y
SKILL.md
Frontmatter
{
    "name": "writing-shape",
    "description": "Writing, exploit — shape raw material into an article, paragraph by paragraph."
}

The user has passed (or will pass) a markdown file of raw material. Treat it as the input pile — anything from a tidy list of fragments to a wall of unstructured prose to a transcript. The format does not matter. Read it end-to-end before doing anything else.

Then run a shaping session that produces a separate article document. This is exploit: the exploring is done, the pile is fixed — commit to a structure and mine the pile to fill it. Do not edit the raw material file — it is read-only to this skill.

If the user did not say where to save the article, ask once and remember the path.

The loop

  1. Read the pile. Read the input file in full. Form a sense of what's in it.
  2. Establish the prerequisites. Settle with the user what the reader knows walking in — the concepts that are grounded from the start. Everything else must be grounded by a block before a later block can lean on it. See Grounding.
  3. Draft 2–3 candidate openings. Each opening should imply a different thesis or angle for the article. Show all of them. Force the user to pick or compose a hybrid. The chosen opening defines what the rest of the article must do.
  4. Grow paragraph by paragraph. After the opening lands, ask "given this opening, what does the reader need to hear next?" Pull material from the pile to answer. The next block may only lean on grounded concepts, and grounds new ones as it lands. Argue about the form the next block takes — a paragraph, a list, a table, a callout, a quote, a code block. Each format choice should be deliberate and defensible.
  5. Append to the article file as you go. Don't batch. Write each agreed paragraph or block immediately so the user can see the article taking shape.
  6. Loop step 4 until the article is done. The user decides when it's done.

Grounding

Every concept has to be grounded before a block can lean on it: the reader either walked in knowing it or met it in an earlier block. A block that reaches for an ungrounded concept loses the reader. The unit is the concept, not the word for it — a block can lean on an idea the reader lacks even with no jargon in sight. Where a concept has a name — a term — grounding it means landing the idea and the term together.

A concept gets grounded one of two ways:

  • Prerequisite — grounded before the opening. The reader brings it. Fixed at the start.
  • Introduced — a block establishes it, and from then on it's grounded for the rest of the article.

Keep a running list of what's grounded. When you ask "what does the reader need to hear next?", an ungrounded concept the next move needs is itself the answer: ground it first — here or in an earlier block — or you can't make the move. This is the gap-naming of Pulling from the pile one level up: there the pile is missing material; here the article is missing a foundation.

The lever is what you make a prerequisite versus what you ground inside the article. Demand too much up front and you shut readers out; ground too much inside and the opening drowns in definitions. Settle it with the user when you establish prerequisites.

Conversational feel

This is a grilling session inverted. In ideation, the question was "what are you actually noticing?" Here it's "what is this article actually arguing, and in what order does the reader need to hear it?" Push back. Refuse to let weak transitions slide. If a paragraph doesn't earn its place, cut it.

Specific moves to keep using:

  • "What does this paragraph do for the reader that the previous one didn't?"
  • "If I cut this, what breaks?"
  • "Is this prose, or should it be a list? Why prose?"
  • "This sentence is doing two jobs — split it or pick one."
  • "The opening promised X. We've drifted to Y. Either re-thread it or change the opening."

Pulling from the pile

Treat the raw material as a quarry, not a script. Pull a fragment, rework it to fit the surrounding paragraph, and place it. A fragment may be split across multiple paragraphs, merged with another, or paraphrased. The pile's job is to be mined; the article's job is to read as one voice.

If the pile lacks something the article needs, name the gap explicitly: "We need an example here and the pile doesn't have one — give me one now or we cut this section."

Format arguments to actually have

When choosing how to render a block, weigh these tradeoffs out loud with the user, not silently:

  • Prose vs. list. Prose carries argument; lists carry parallel items. If items aren't truly parallel, prose is better. If they are, a list is faster to scan.
  • Inline vs. callout. Tips, warnings, and asides go in callouts (> [!TIP], > [!NOTE]) — but only if they'd genuinely derail the main argument inline. Otherwise leave them inline.
  • Table vs. repeated structure. If the same shape repeats 3+ times with the same fields, a table. Otherwise prose with bold leads.
  • Quote vs. paraphrase. Quote when the original wording is the point. Paraphrase when only the idea matters.
  • Code block vs. inline code. Multi-line, runnable, or illustrative → block. Single token or identifier → inline.

Writing rhythm

Append to the article file as each block is agreed. Re-read the file from disk before every write — the user may have edited between turns. Never overwrite blindly. If the user wants a paragraph rewritten, edit that specific paragraph in place; leave the rest alone.

Out of scope

  • Mining for new fragments that aren't in the pile (handle gaps as in "Pulling from the pile").
  • Editing the raw material file.
  • Publishing, formatting for a specific platform, or adding frontmatter the user didn't ask for.
为 Remotion 项目提供可复制粘贴的动画组件和 UI 原语。支持文本动画、转场、背景及 shadcn 风格 UI 模拟,通过 shadcn 安装,分为帧驱动动画和时间轴驱动 UI 两类,助力制作高质量视频内容。
构建 Remotion 视频或场景 添加动画、转场或背景效果 使用视频就绪的 UI 原语(如按钮、对话框)
skills/remocn/SKILL.md
npx skills add Remocn/remocn --skill remocn -g -y
SKILL.md
Frontmatter
{
    "name": "remocn",
    "description": "Build Remotion videos with remocn — copy-paste animation components and timeline-driven UI primitives from a shadcn registry. Use when composing a video or scene in a Remotion project, adding a single animation, transition, background, or UI-block sim, or reaching for a video-ready UI primitive (button, dialog, command menu). Activate for polished Remotion video work even when remocn isn't named."
}

remocn

Copy-paste components for Remotion videos. Components install via shadcn and land in components/remocn/ — you own the code.

Installation

Prerequisites: a Remotion project (npx create-video@latest).

# Add any component (namespaced shadcn registry)
shadcn add @remocn/blur-out-up

# Component lands at components/remocn/blur-out-up.tsx

@remocn/<name> is the canonical namespaced form (configured under registries in components.json). The plain registry URL https://remocn.dev/r/<name>.json also works.

Dependencies install automatically

Many components pull others via registryDependenciesshadcn installs them transitively. For example, shadcn add @remocn/typewriter also pulls @remocn/remocn-ui and @remocn/caret.

  • @remocn/remocn-ui is the shared core lib (timeline-fold hook, theme context, color math). Most UI Primitives depend on it. You rarely install it directly.

Two tiers

remocn has two kinds of components — they have different APIs:

  • Animation tier (remocn) — text animations, transitions, backgrounds, UI-block sims, brand/social cards, full compositions. Frame-driven. Shared props: speed (time multiplier), and for text: fontSize, color, fontWeight.
  • UI Primitives (remocn-ui) — timeline-driven shadcn-style primitives (button, dialog, select, command-menu, tooltip…). State-based props (state, style, variant, theme). No speed prop. Built on @remocn/remocn-ui.

Component categories

Pick by what you're building. The catalog is split one file per component under references/components/. Start at references/components/index.md — a router table grouped by these categories with a Use for / Avoid for signal per component. Scan it, pick candidates, then open only the references/components/<name>.md files you need (full props, example, all use / don't-use notes). Don't read every file.

Category Tier Use for
Text Animations remocn Reveal/replace/emphasize text (typewriter, blur-out-up, tracking-in, rolling-number, shimmer-sweep…)
Backgrounds & Effects remocn Animated foundations, cursors, one-shot effects (simulated-cursor, confetti, backdrop)
Shaders remocn WebGL shader backdrops, frame-driven for deterministic renders (shader-mesh-gradient, shader-warp, shader-voronoi, shader-god-rays, shader-metaballs…)
Transitions remocn TransitionSeries presentations between two scenes (whip-pan, push-through, focus-pull, grain-dissolve, wave-wipe…)
UI Blocks remocn Interface sims for product demos (terminal-simulator, glass-code-block, animated-bar-chart, progress-steps…)
AI & Social Cards remocn Brand/product card scenes (chat-gpt, claude-code, v0, github-stars, x-follow-card…)
UI Primitives remocn-ui shadcn-style primitives for video (button, dialog, select, command-menu, tooltip…)

Component patterns

Conventions differ by tier — don't assume animation-tier props on a primitive.

Animation tier (remocn)

  • Named Props interface per component (e.g. BlurOutUpProps).
  • speed?: number — global time multiplier (default 1), applied as frame * speed.
  • Text components: fontSize, color, fontWeight.
  • Transitions: lowercase factories (e.g. whipPan(props)) returning a TransitionPresentation — pass to TransitionSeries.Transition via presentation, pace with linearTiming / springTiming.
  • className?: string on the root.

UI Primitives (remocn-ui)

  • State-based, not speed-based: state (e.g. "open" / "closed"), style, variant, size, theme?: Partial<RemocnTheme>.
  • The opened/closed/active state is a pure function of the timeline (keyframed presets).
  • Compose modal-layer primitives (dialog, alert-dialog, drawer) with a trigger element — see each component's example.

Animation API

import { interpolate, spring, useCurrentFrame, useVideoConfig } from "remotion";

const opacity = interpolate(frame, [0, 30], [0, 1], { extrapolateRight: "clamp" });
const scale = spring({ fps, frame, config: { damping: 12, mass: 1, stiffness: 100 } });

// Deterministic randomness (NEVER Math.random())
import { random } from "@remotion/random";
const jitter = random(`seed-${frame}`);

Composition structure

import { Sequence, Series } from "remotion";

<Sequence from={30} durationInFrames={60}>
  <Typewriter text="npm install remocn" />
</Sequence>

<Series>
  <Series.Sequence durationInFrames={60}><SceneA /></Series.Sequence>
  <Series.Sequence durationInFrames={60}><SceneB /></Series.Sequence>
</Series>

Canvas & timing

  • Canvas standard: 1280×720 @ 30fps. Components are laid out for it.
  • Budget each Sequence around the component's natural length — the Length column in components/index.md (and each file's Natural length). Under-budgeting clips the animation; over-budgeting leaves dead air.
  • Tone matching: each catalog entry carries a vibe tag (tech/premium/data/clean/ playful/social) — pick components whose vibe fits the brand.
  • Palette & fonts: stay within the library's tokens (references/design.md → tokens) so your own elements don't clash.

Design defaults — avoid AI-slop

Your own additions (text, scene chrome, cards — not the prebuilt components) stay restrained: default tracking, sentence case, solid text color, subtle 1px elevation — no decorative letter-spacing, ALL-CAPS, gradient text-fills, or glow shadows. Never strip these traits from a component whose essence is the effect (tracking-in, social-card gradients, designed elevation).

Full do/avoid examples + design tokens: references/design.md. Motion quality (timing, anticipation, staging, easing): references/motion-principles.md.

Gotchas (remocn-specific)

  • Terminal scroll is instant — step-function translateY, never spring/ease the scroll.
  • overflow: hidden on split layouts — prevents content breakage during width animations.
  • Cursor blink is deterministicMath.floor(frame / 15) % 2 === 0, not intervals.
  • Static files go in public/ — load via staticFile('cursor.svg'), not imports.
  • Social cards render offlineavatarUrl="" / coverUrl="" fall back to gradients; no fetch.

General Remotion rules (no Math.random(), no setInterval, animate transform not top/left, load fonts before render) live in the remotion-best-practices skill.

Composing a video

Don't dump components — compose one story. When asked to build a full video ("make a product demo", "changelog video", "intro for my landing"):

  1. Decide the strategy — ready template vs compose from components vs build a new component. See references/anatomy.md §1.
  2. Follow the beats — a product demo is Hook → Positioning → Product reveal → Features → Proof → CTA (last two optional). See references/anatomy.md §2.
  3. Use the recipereferences/archetypes/index.md routes to per-archetype builds: content contract (infer → ask → placeholder), duration variants, beat→component slots, and a worked <TransitionSeries> skeleton.
  4. Pick each beat's component from references/components/index.md; match the vibe tag to the brand and budget its Sequence per Canvas & timing above.
  5. Check the quality bar — one accent, sentence-case kinetic type, real content, no glow halos, no feature-list enumeration. See references/anatomy.md §3.

Reference

  • references/anatomy.md — composing a full video: strategy (template/compose/new), the product-demo beats, and the good-vs-slop quality bar.
  • references/archetypes/index.md — router to per-archetype build recipes (product-demo flagship + changelog, feature-announcement, oss-showcase, cli-tool-demo, testimonial-reel, year-in-review, pricing-reveal, logo-bumper): content contract, duration variants, beat→slot map.
  • references/components/index.md — router table (all components, grouped by category, with Use for / Avoid for). Open references/components/<name>.md for one component's full props, example, and use / don't-use notes.
  • references/design.md — anti-slop design defaults (do/avoid) + design tokens (palette, fonts, canvas).
  • references/motion-principles.md — motion-design principles adapted to remocn + Remotion.
  • references/anti-patterns.md — common generation mistakes and their fixes.
通过持续的追问和压力测试,帮助用户打磨和优化计划或设计方案。适用于需要深度审视逻辑、发现潜在漏洞或提升方案严谨性的场景。
用户希望优化现有计划 用户寻求对设计方案的批判性反馈 用户进行模拟面试以检验准备情况
.agents/skills/grill-me/SKILL.md
npx skills add Remocn/remocn --skill grill-me -g -y
SKILL.md
Frontmatter
{
    "name": "grill-me",
    "description": "A relentless interview to sharpen a plan or design.",
    "disable-model-invocation": true
}

Run a /grilling session.

通过持续的模拟面试来打磨计划或设计,并在过程中生成架构决策记录(ADR)和术语表。
用户希望优化现有设计方案 用户需要为项目创建文档
.agents/skills/grill-with-docs/SKILL.md
npx skills add Remocn/remocn --skill grill-with-docs -g -y
SKILL.md
Frontmatter
{
    "name": "grill-with-docs",
    "description": "A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.",
    "disable-model-invocation": true
}

Run a /grilling session, using the /domain-modeling skill.

通过持续的拷问式对话,帮助用户打磨和优化计划或设计方案。
用户希望优化现有计划 用户需要完善设计方案
agent/skills/grill-me/SKILL.md
npx skills add Remocn/remocn --skill grill-me -g -y
SKILL.md
Frontmatter
{
    "name": "grill-me",
    "description": "A relentless interview to sharpen a plan or design."
}

Run a /grilling session.

通过持续的面试式提问来打磨计划或设计,并在此过程中生成架构决策记录(ADR)和术语表。
需要深入审视和优化系统设计时 需要创建架构决策记录或术语表时
agent/skills/grill-with-docs/SKILL.md
npx skills add Remocn/remocn --skill grill-with-docs -g -y
SKILL.md
Frontmatter
{
    "name": "grill-with-docs",
    "description": "A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go."
}

Run a /grilling session, using the /domain-modeling skill.

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-22 11:37
浙ICP备14020137号-1 $お客様$