agentleFS
hiendinhngochiendinhngoc/unknowns/skills/verify-ref/SKILL.md

verify-ref

Skill9 starsChanged 5 months agoMITView on GitHub

Comprehension gate before porting, copying, or adapting an existing implementation. Proves understanding of the reference code before any new code is written. Use when the task is "port X", "copy how Y does it", "adapt Z", or reimplementing existing behavior.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Locate the reference: Use the argument or conversation context.

    line 19
  2. Distinctive:

    Set a behavioral boundary, then read it fully: Read the referenced unit, its direct callers, and direct dependencies that affect observable …

    line 21
  3. Distinctive:

    Follow deeper calls only while they change outputs, side effects, errors, or ordering.

    line 23
  4. Distinctive:

    Edge cases handled: every guard, fallback, retry, and special case, and what each protects against

    line 28
  5. Distinctive:

    Self-challenge: Add a section: "What would break if I got this wrong?" — name the 2-3 misreadings most likely to cause a subtly wrong port …

    line 43
  6. Distinctive:

    Gate: Ask the user to confirm the proof or correct it.

    line 46

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Reference Verification

Prove you understand the reference implementation BEFORE porting it. Misunderstood references produce confidently wrong ports.

<HARD-GATE>Write no implementation code until the user confirms the comprehension proof below.</HARD-GATE>

Process

  1. Locate the reference. Use the argument or conversation context. If ambiguous, ask which implementation is the reference — don't guess.
  2. Set a behavioral boundary, then read it fully. Read the referenced unit, its direct callers, and direct dependencies that affect observable behavior. Follow deeper calls only while they change outputs, side effects, errors, or ordering. List unresolved or external dependencies instead of recursively expanding without a stop condition.
  3. Produce the comprehension proof, covering:

    • Data flow: inputs → transformations → outputs, in order
    • Edge cases handled: every guard, fallback, retry, and special case, and what each protects against
    • Invariants: what must remain true before/after (ordering, uniqueness, idempotency, transactional boundaries)
    • Hidden dependencies: globals, config, environment, call-order assumptions, side effects the signature doesn't show. For UI code, also name the framework semantics the reference leans on: lifecycle hooks that fire once vs. per-render, view identity, and task/cleanup-on-teardown behavior — these are where ports break silently.

    Proportionality: for a small same-repo adaptation (roughly ≤30 lines, no concurrency, no money/auth/persistence), a short proof of just Data flow and What would break if I got this wrong? suffices — but step 2's full read of the reference and its callers is never skipped; that read is where latent bugs surface.

  4. Self-challenge. Add a section: "What would break if I got this wrong?" — name the 2-3 misreadings most likely to cause a subtly wrong port and say why your reading is correct (cite file:line evidence).
  5. Gate. Ask the user to confirm the proof or correct it. Only after confirmation may implementation begin. A plan the user already approved that names this exact port also counts as confirmation — say the proof is being accepted under that approval and proceed. Otherwise, if no interactive user is available, stop after the proof and identify the exact uncertainty that needs review; do not silently treat the proof as approval.

Output format

## Comprehension proof: <reference name> (<file:line range>)
### Data flow
### Edge cases handled
### Invariants
### Hidden dependencies
### What would break if I got this wrong?

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.