Agent skill

Code Doc

by romeerez in romeerez/orchid-orm

A skill your agent uses when the user prompts "code doc" to create or update internal Orchid ORM code documentation from changes/ specs, short-code feature folders, or existing implementation code.

MITAuto-check passedDatabases

Install Code Doc

skills CLI
$ npx skills add romeerez/orchid-orm --skill code-doc -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install romeerez/orchid-orm code-doc --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/romeerez/orchid-orm.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/code-doc .claude/skills/code-doc && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
code-doc
GitHub stars
543
Token cost
~2.2k tokens
SKILL.md length
1,221 words
Files
2
Skills in repo
13
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when the user prompts "code doc" to create or update internal Orchid ORM code documentation from changes/ specs, short-code feature folders, or existing implementation code.

  • Works in 9 steps: Resolve the source scope. → Distill the source specs. → Inspect the implementation. → …
  • The user prompts code doc to create
  • Calls pnpm
  • Update internal Orchid ORM code documentation from changes/ specs

What it does

Code Doc is an agent skill from romeerez/orchid-orm. Use when the user prompts "code doc" to create or update internal Orchid ORM code documentation from changes/ specs, short-code feature folders, or existing implementation code.

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `agents/openai.yaml`).

It sits in Databases, covering ORMs and data access and Technical documentation. The licence is MIT.

When your agent uses it

  • The user prompts code doc to create
  • Update internal Orchid ORM code documentation from changes/ specs
  • Short-code feature folders
  • Existing implementation code

Example prompts

  • “code doc”
  • “/code-doc”

Workflow steps

9 steps, taken from the first numbered list in SKILL.md.

  1. Resolve the source scope.
  2. Distill the source specs.
  3. Inspect the implementation.
  4. Choose doc locations.
  5. Name docs deliberately.
  6. Write the docs.
  7. De-duplicate and tighten.
  8. Add code comments only for gotchas.
  9. Verify and archive.

What it can do on your machine

Read from SKILL.md and the folder at commit 7d4927a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pnpm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pnpm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Code Doc loads about 2.2k tokens when it runs. Until then it costs about 47 tokens; SKILL.md has 1,221 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~47
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from romeerez/orchid-orm at commit 7d4927a, republished under its MIT licence (© romeerez). 1,221 words, ~2,216 tokens.

Download SKILL.mdSave it as .claude/skills/code-doc/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
code-doc
description
Use when the user prompts "code doc" to create or update internal Orchid ORM code documentation from changes/ specs, short-code feature folders, or existing implementation code.

Document internal feature knowledge close to the implementation. Use top-level specs only when durable knowledge is shared across packages.

Inputs

  • code doc _1: resolve one changes/_1-* folder.
  • code doc 707: resolve one changes/707-* folder.
  • code doc _1 2: document only the nested folder in changes/_1-* that starts with 2.
  • code doc select: document an implementation topic that may not live in changes/.

If the feature folder, nested selector, or implementation topic is ambiguous, ask one focused clarification question. Otherwise infer the scope and proceed.

Caveman style

  • When this skill runs, use the caveman skill's full style for all agent-facing progress, questions, and final reports: terse fragments, no filler, exact technical terms preserved.
  • Do not announce the style. Just write that way.
  • Generated code docs must also use caveman style. Keep markdown headings, links, code symbols, API names, SQL terms, and quoted errors exact; compress explanatory prose.
  • Do not compress so far that durable technical meaning, ordering, or ownership becomes ambiguous. If caveman wording would hide a constraint, write the clear version.
  • Code blocks and code comments stay normal code style.

Workflow

  1. Resolve the source scope.

    • If the input starts with a code or number, find exactly one non-archived changes/<id>-* folder whose name starts with that value.
    • If a second numeric selector is provided, include only the direct child folder whose first path segment equals that number, such as 1-* for 1, and read its spec.md.
    • Without a nested selector, find every spec.md under the matched feature folder and treat all of them as the documentation source.
    • Also read useful feature-level context files in that change folder, such as research.md or a root spec.md, when present.
    • If the request is not based on changes/, search the implementation, tests, and docs for the named topic.
  2. Distill the source specs.

    • Extract only durable requirements, constraints, decisions, gotchas, known omissions, and reasons for unusual behavior.
    • Drop task-management detail, implementation history, repeated examples, and obvious API descriptions.
    • Separate cross-package facts from package-specific implementation details.
  3. Inspect the implementation.

    • Use rg to search feature names, API names, SQL terms, metadata keys, tests, and migration/generator code.
    • Follow the code wherever the feature actually lives. Relevant behavior may be split across the main feature file, helper modules, type surfaces, internal metadata, public exports, internal exports, tests, SQL rendering, introspection, migration generation, adapter hooks, or package setup glue.
    • Determine the affected packages and the smallest relevant set of code files that explain each package's role.
    • Read the actual implementation before writing docs. Do not rely only on changes/.
    • Look for nuances not captured in the source specs: defensive conditions, ordering requirements, metadata shapes, Postgres constraints, compatibility behavior, and workarounds.
  4. Choose doc locations.

    • Before creating a doc, search existing .md files under specs/ and the affected package folders for the same feature under another name. Update or merge with the existing doc when it already owns the topic.
    • Default to package-local docs when the implementation and durable decisions are owned by one package, even if the source change folder describes a user-visible feature.
    • For a feature fully owned by one package and centered on one code file, put one markdown file beside that code file with the same base name.
    • If a package implements one feature across several files, create one package-level feature doc in the folder that best owns the feature. That single doc owns the package's role for the feature, including supporting files and helper modules.
    • Do not create one doc per implementation file when those files support the same package-level feature.
    • If unrelated aspects in the same package are genuinely distinct, create separate focused docs.
    • If there is no dedicated code file, infer the clearest feature name, such as foreign-key.md, and place it in the folder most relevant to that code.
    • Create or update a top-level specs/<feature-name>.md only when the feature spans packages or has durable requirements that multiple packages must share.
    • Do not create a top-level spec just because the source lives in changes/<id>-*, has a feature-style name, or includes public API details for one package.
  5. Name docs deliberately.

    • Derive top-level spec names from the change folder only after deciding a top-level spec is warranted. Drop numeric prefixes and short tracking-code prefixes. Example: changes/_2-grant-revoke becomes specs/grant-revoke.md.
    • Package docs usually match the main implementation file without the TypeScript suffix.
    • Drop implementation-only suffixes such as .db when they are not meaningful to the feature doc. Example: grants.db.ts gets grants.md.
    • Keep meaningful suffixes that describe a package role. Example: grants.generator.ts gets grants.generator.md.
  6. Write the docs.

    • Top-level specs describe only cross-package knowledge: purpose, requirements, Postgres or platform constraints, decisions, gotchas, known omissions, and links to package docs.
    • Package docs describe only that package's role: what it owns, relevant files, package-specific requirements, internal decisions, non-obvious conditions, and gotchas.
    • Package docs for cross-package features must link to the top-level spec instead of duplicating feature-wide requirements.
    • Top-level specs must link back to all package docs with one brief note per package role.
    • For a package-only feature, put durable purpose, requirements, decisions, gotchas, and known omissions directly in the package doc.
    • Keep docs distilled. Do not document every function, restate tests, or duplicate neighboring specs.
    • Use whatever document shape best fits the feature, but write for future maintainers who need to understand why non-obvious code exists.
    • Use caveman style in prose: short, direct fragments are okay; exact technical names stay unchanged; constraints stay unambiguous.
    • Prefer relative markdown links.
  7. De-duplicate and tighten.

    • For cross-package features, re-read the top-level and package docs together before finishing.
    • Move duplicated feature-wide knowledge into the top-level spec and replace package-level copies with links.
    • Move package-specific details out of the top-level spec and into the owning package doc.
    • Ensure no two docs in the same package cover the same feature under different names.
    • Ensure package docs mention other packages only by linking to the top-level spec or by a brief role note when needed for orientation.
  8. Add code comments only for gotchas.

    • If implementation code contains a workaround, surprising condition, ordering dependency, or edge-case guard whose reason is not obvious, add a short comment explaining why it exists.
    • Do not add comments that restate straightforward code.
  9. Verify and archive.

    • Run pnpm verify. If only markdown docs changed and no packages are affected, inspect the written links and formatting manually.
    • If the skill was run for a full changes/<id>-* feature without a nested selector, move the entire feature folder to changes/archived/ after docs are written and checked.
    • Do not archive when a nested selector such as 1 or 2 was used.
    • Do not archive when the request documented an implementation topic outside changes/.
    • If changes/archived/<folder-name> already exists, stop and ask before moving.
Show full SKILL.md (113 more words)Show less

Quality bar

  • The docs explain why non-obvious code exists, not just what it does.
  • Cross-package knowledge lives in one top-level spec.
  • Package-only knowledge lives in package docs, with no top-level spec created solely as a feature summary.
  • Package docs do not describe other packages' implementations.
  • Related package docs link through the top-level spec instead of duplicating requirements.
  • Existing code and tests are inspected before conclusions are written.
  • Uncertainty is called out in the final response when inference was required.

Final report

Report in caveman style: resolved source scope, docs created or updated, packages covered, code comments added, verification performed, whether the change folder was archived, and any points that were documented with uncertainty.

© romeerez, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in .agents/skills/code-doc of romeerez/orchid-orm.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit 7d4927a

Compare with similar skills

Code Doc next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Code Doc compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Code Doc this skillromeerez/orchid-orm543—~2.2kAutomated safety check: PassMIT
Fetching Library Docsaiskillstore/marketplace4301 repos~1.6kAutomated safety check: PassNone
Content Create Hero Imageprisma/web1.1k—~6.9kAutomated safety check: PassNone
Sea Orm 2FlyinPancake/yoink112—~2.9kAutomated safety check: PassApache-2.0
Prisma Client APIcurvenote/curvenote1692 repos~1.6kAutomated safety check: PassMIT
DB Migratesimstudioai/sim30k—~2kAutomated safety check: PassApache-2.0

Similar skills

  • Fetching Library Docs

    aiskillstore/marketplace

    Token-efficient library API documentation fetcher using Context7 MCP with 77% token savings.

    430 GitHub starsUsed in 1 repo~1.6k tokens
    DatabasesAuto-check passed
  • Official

    A skill your agent uses when the operator wants a hero or meta image for a Prisma blog post; asks to create or generate a blog hero, cover, social card, Open Graph, or YouTube image; mentions cover…

    1.1k GitHub stars~6.9k tokensUpdated today
    DatabasesAuto-check passed
  • Sea Orm 2

    FlyinPancake/yoink

    Expert guidance for SeaORM 2.0, Rust's async ORM with strongly-typed columns, nested ActiveModels, Entity Loader API, and entity-first workflow.

    112 GitHub stars~2.9k tokensUpdated 3 days ago
    DatabasesAuto-check passed
  • Prisma Client API

    curvenote/curvenote

    Prisma Client API reference covering model queries, filters, operators, and client methods.

    169 GitHub starsUsed in 2 repos~1.6k tokens
    DatabasesAuto-check passed
  • DB Migrate

    simstudioai/sim

    Author or review a Drizzle DB migration for zero-downtime safety — expand/contract phasing, backward-compatibility with the deployed app version, and writing the -- migration-safe acknowledgment the…

    30k GitHub stars~2k tokensUpdated today
    DatabasesAuto-check passed
  • DB Migrations

    kurealnum/dotfiles

    A skill your agent uses when generating or regenerating Drizzle migration files, changing database schema tables or columns, resolving migration sequence conflicts after rebase, reviewing migration…

    290 GitHub stars~820 tokensUpdated 5 mo ago
    DatabasesAuto-check passed

More from romeerez/orchid-orm

All 13 skills in this repo
  • Spec

    romeerez/orchid-orm

    A skill your agent uses when the user prompts "write spec" or "make spec".

    543 GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Task List

    romeerez/orchid-orm

    A skill your agent uses when user asks to write a task list, not to do a task

    543 GitHub stars~2.1k tokensUpdated today
    Auto-check passed
  • Type Optimizer

    romeerez/orchid-orm

    A skill your agent uses when need to optimize TypeScript types.

    543 GitHub stars~798 tokensUpdated today
    Auto-check passed
  • Ideas

    romeerez/orchid-orm

    A skill your agent uses when the user prompts "write ideas" or "make ideas".

    543 GitHub stars~2.4k tokensUpdated today
    Auto-check passed
  • Implemenation Note

    romeerez/orchid-orm

    A skill your agent uses when the user prompts "implementation note" for an existing change idea.

    543 GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Refine

    romeerez/orchid-orm

    A skill your agent uses when the user prompts "refine design".

    543 GitHub stars~2.2k tokensUpdated today
    Auto-check passed

Categories

Questions about Code Doc

What does Code Doc do?

A skill your agent uses when the user prompts "code doc" to create or update internal Orchid ORM code documentation from changes/ specs, short-code feature folders, or existing implementation code. Code Doc is an agent skill from romeerez/orchid-orm. Use when the user prompts "code doc" to create or update internal Orchid ORM code documentation from changes/ specs, short-code feature folders, or existing implementation code.

When should I use Code Doc?

Code Doc fits situations like: the user prompts code doc to create; update internal Orchid ORM code documentation from changes/ specs; short-code feature folders; existing implementation code.

How do I install Code Doc in Claude Code?

Run `npx skills add romeerez/orchid-orm --skill code-doc -a claude-code`. Or copy the skill folder (.agents/skills/code-doc in romeerez/orchid-orm) into .claude/skills/code-doc in your project. Claude Code loads it when a task matches its description.

How do I install Code Doc in Codex?

Run `npx skills add romeerez/orchid-orm --skill code-doc -a codex`. Or copy the skill folder (.agents/skills/code-doc in romeerez/orchid-orm) into .agents/skills/code-doc in your project. Codex loads it when a task matches its description.

Can I use Code Doc in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add romeerez/orchid-orm --skill code-doc -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/code-doc, .gemini/skills/code-doc, .github/skills/code-doc and .opencode/skills/code-doc in your project.

What does Code Doc need to run?

Going by SKILL.md and its folder, Code Doc needs the command-line tools its instructions call (pnpm).

Does Code Doc access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Code Doc safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Code Doc use?

Code Doc is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Code Doc use?

About 2.2k tokens (SKILL.md is roughly 8.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Code Doc?

Skills that share tags, products or a category with Code Doc: Fetching Library Docs (aiskillstore/marketplace, 430 stars), Content Create Hero Image (prisma/web, 1.1k stars), Sea Orm 2 (FlyinPancake/yoink, 112 stars) and Prisma Client API (curvenote/curvenote, 169 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Code Doc?

romeerez (a GitHub user) maintains it in romeerez/orchid-orm, which has 543 GitHub stars. The repository holds 13 skills in this directory. The repository was last updated on October 7, 2026.

Source: romeerez/orchid-orm on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.