Agent skill

Shift Subsystem Docs

by shift-editor in shift-editor/shift

Updates or creates DOCS.md files for Shift subsystems, recording the architecture invariants and constraints that cannot be learned from reading the source.

Apache-2.0Auto-check passedDevelopment

Install Shift Subsystem Docs

skills CLI
$ npx skills add shift-editor/shift --skill docs -a claude-code

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

GitHub CLI
$ gh skill install shift-editor/shift docs --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/shift-editor/shift.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/docs .claude/skills/docs && 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
docs
GitHub stars
343
Token cost
~1.9k tokens
SKILL.md length
903 words
Files
1
Skills in repo
14
Repo updated
First seen
Licence
Apache-2.0

At a glance

Updates or creates DOCS.md files for Shift subsystems, recording the architecture invariants and constraints that cannot be learned from reading the source.

  • Works in 4 steps: Read docs/architecture/index.md to find… → Read the current DOCS.md if one exists → Read the module's source code to… → …
  • Refreshing a subsystem's DOCS.md after a large feature lands
  • SKILL.md covers Before writing, DOCS.md section order, Writing each section and What not to write, plus 5 more sections
  • Calls python3 and node

What it does

Before writing, the agent reads docs/architecture/index.md to find the canonical doc for the subsystem, the current DOCS.md if there is one, and the module source to see what changed. It defaults to updating existing files and confirms with you before creating a new DOCS.md. Every file follows a fixed section order, with empty sections left out but the order kept.

The most valued section is Architecture Invariants, where each entry states a rule and why it exists. Good ones describe what never happens, performance-driven choices and semantic distinctions invisible in types, and bad ones merely restate what the code does. CRITICAL labels are reserved for rules that silently break things. A Codemap section is a short tree of key files with one-line purposes, skipping fixtures, generated files and barrel re-exports. The excerpt ends at Key Types.

When your agent uses it

  • Refreshing a subsystem's DOCS.md after a large feature lands
  • Creating a DOCS.md for a module that has none
  • Writing architecture invariants that explain why a rule exists

Example prompts

  • “Update docs for the glyph editing subsystem.”
  • “Create a DOCS.md for the rendering module, but confirm with me first.”
  • “Check whether any DOCS.md in the area I just changed needs refreshing.”

Requirements

  • A checkout of the Shift repository with its docs/architecture index

Workflow steps

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

  1. Read docs/architecture/index.md to find the canonical doc for the subsystem
  2. Read the current DOCS.md if one exists
  3. Read the module's source code to understand what has actually changed
  4. If creating a new DOCS.md, confirm with the user first — this skill defaults to updating existing docs

What it can do on your machine

Read from SKILL.md and the folder at commit e7dacfa. 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:

    • python3
    • node

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

  • Network

    No URLs in SKILL.md.

    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

Shift Subsystem Docs loads about 1.9k tokens when it runs. Until then it costs about 89 tokens; SKILL.md has 903 words of instructions outside code blocks.

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

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 shift-editor/shift at commit e7dacfa, republished under its Apache-2.0 licence (© shift-editor). 903 words, ~1,875 tokens.

Download SKILL.mdSave it as .claude/skills/docs/SKILL.md (or your agent's skills folder).
name
docs
description
Update or create DOCS.md files for Shift subsystems. Use this skill whenever the user asks to update docs, refresh documentation, create a DOCS.md, write module documentation, or says "update docs for X". Also trigger after completing a large feature when Claude.md says to update docs — check if any DOCS.md in the affected subsystem needs refreshing.

/docs — Update or Create Module Documentation

The goal is documentation that helps agents and contributors understand constraints they cannot discover by reading source code.

Before writing

  1. Read docs/architecture/index.md to find the canonical doc for the subsystem
  2. Read the current DOCS.md if one exists
  3. Read the module's source code to understand what has actually changed
  4. If creating a new DOCS.md, confirm with the user first — this skill defaults to updating existing docs

DOCS.md section order

Every DOCS.md follows this structure. Omit empty sections but preserve the order.

markdown
# Module Name

One-sentence purpose.

## Architecture Invariants

## Codemap

## Key Types

## How it works

## Workflow recipes

## Gotchas

## Verification

## Related

Writing each section

Architecture Invariants

This is the most valuable section because it captures knowledge that is invisible in code. A contributor can read every line of source and still violate an invariant, because invariants describe absences, performance motivations, and semantic distinctions that only make sense with historical context.

Each invariant states a rule and explains why it exists:

Architecture Invariant: Rust is never touched during the draft preview hot path. SourceEditDraft.previewPositionPatch() applies a sparse patch to local reactive geometry only. Rust sees the final sparse patch once when commit() calls GlyphSource.commitPositionPatch(). This exists because round-tripping full glyph values for thousands of points per frame causes long frames and GC pressure.

Good invariants describe:

  • What never happens and why ("X never imports Y because Z")
  • Performance-motivated design choices ("uses flat arrays, never JSON, because Y")
  • Semantic distinctions invisible in types ("$glyph fires on identity changes, not data changes")

Bad invariants just restate what the code does ("X calls Y", "X extends Z"). If you can see it by reading the source, it does not belong here.

Use **CRITICAL**: labels sparingly — only for rules that will silently break things or waste hours if violated. These are not style preferences; they are landmines.

Codemap

A tree showing key files with one-line purposes. Skip test fixtures, generated files, and barrel re-exports. The point is orientation, not an exhaustive listing.

module/
├── Foo.ts         — one-line purpose
├── Bar.ts         — one-line purpose
└── types.ts       — one-line purpose
Key Types

Only types that matter for understanding the module's contract. Reference by symbol name (EditSession, BaseTool), not file path. Symbol names survive refactors; paths break.

How it works

Brief narrative explaining data flow and lifecycle. Focus on design rationale for non-obvious choices — "we do X because Y, not because Z." This is not an API dump listing every method signature.

Workflow recipes

Step-by-step instructions for common modifications. Include which symbols to touch and what verification to run. Be specific enough that someone unfamiliar with the module can follow along:

markdown
### Adding a new tool

1. Create a class extending `BaseTool` in `lib/tools/`
2. Define `behaviors` array — first `canHandle` match wins
3. Implement `activate()` to enter a reactive state (e.g. `"ready"`)
4. Register in `ToolRegistry`
5. Verify: `pnpm typecheck && pnpm test`
Gotchas

Things that have bitten people. Performance traps. Known edge cases. These are experiential — the kind of thing someone would tell a new teammate over coffee.

Verification

What to run after changing this module. Be specific about which commands and what they check.

Other modules this one connects to, referenced by symbol name with a brief note on the relationship.

What not to write

These patterns weaken documentation and cause maintenance burden:

  • API dumps — listing every method with its signature. The code is the API reference; docs should explain what the code cannot.
  • Duplicating Claude.md — if a rule is in the root constitution, don't repeat it. A contributor who read Claude.md and then reads your DOCS.md shouldn't see the same rule twice.
  • Exhaustive file lists — listing every file in a directory rots immediately. The codemap should cover key files only.
  • Generic descriptions — "This module handles X" without explaining why it handles X this particular way. The interesting part is always the design choice, not the responsibility statement.
  • Cross-cutting architecture — narratives spanning multiple subsystems belong in docs/architecture/, not in one module's DOCS.md.
Show full SKILL.md (315 more words)Show less

Review attestation

Every DOCS.md carries, within its first five lines:

markdown
<!-- reviewed: 2026-08-18 review-every: 90d -->

Bump the reviewed date ONLY after actually re-verifying the doc's claims against source — it is an attestation, not a timestamp. The checker flags docs whose review is overdue or whose source moved after the last review; committing the doc without bumping the date deliberately does NOT clear staleness.

Enforced invariants

When an invariant is structurally enforceable (dependency bans, import surfaces), prefer adding a rule to scripts/check-invariants.py and citing it from the doc: "Enforced by scripts/check-invariants.py (rule-id)". Prose stays for the WHY; the rule owns the WHAT. Unenforceable motivation (performance rationale, temporal claims) stays prose — don't fake precision.

Code fences

  • ts/typescript fences are type-checked in CI against the module's tsconfig (node scripts/check-docs-fences.mjs). Make examples self-contained: real imports plus declare const preambles for free variables. A deliberately non-compiling fragment opts out with ```typescript illustrative.
  • Codemap trees are validated path-by-path against the filesystem — every listed file must exist. python3 scripts/context-drift-check.py --codemap <doc> prints the module's real tree as ground truth to curate from (curate; don't paste it wholesale).
  • Command lines (pnpm/cargo/vitest, fenced or inline) are validated against real scripts, packages, and CLI flags.

After writing

  1. Verify backtick-quoted symbols still exist — grep for each PascalCase symbol in the doc
  2. Verify markdown links resolve to real files
  3. Run python3 scripts/context-drift-check.py to validate the full docs system (it auto-discovers every DOCS.md), plus node scripts/check-docs-fences.mjs if you touched ts fences and python3 scripts/check-invariants.py if you touched an enforced invariant
  4. Bump the doc's reviewed: date — you just verified it
  5. Prefer small, accurate updates over comprehensive rewrites. A doc with three correct invariants beats one with ten stale ones.

Scope boundaries

  • Do not modify Claude.md — it is manually curated
  • Do not create CONTEXT.md files — banned by Claude.md
  • Cross-cutting architecture docs go in docs/architecture/, not module DOCS.md
  • Do not create new DOCS.md files without an explicit request from the user

© shift-editor, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/docs of shift-editor/shift.

Open the folder on GitHubat commit e7dacfa

Compare with similar skills

Shift Subsystem Docs 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.

Shift Subsystem Docs compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Shift Subsystem Docs this skillshift-editor/shift343—~1.9kAutomated safety check: PassApache-2.0
Dark Architecture Diagram BuilderCocoon-AI/architecture-diagram-generator7.4k1 repos~2.1kAutomated safety check: PassMIT
Deepwiki Rssopaco/deepwiki-rs3.1k—~748Automated safety check: PassMIT
Mermaid Diagramsjjmartres/opencode1336 repos~1.9kAutomated safety check: PassMIT
C4 Architecture Diagramslexler/skill-factory239—~2.3kAutomated safety check: PassApache-2.0
MVP Technical DesignKhazP/vibe-coding-prompt-template3.1k—~512Automated safety check: PassMIT

Similar skills

  • Dark Architecture Diagram Builder

    Cocoon-AI/architecture-diagram-generator

    Creates dark-themed system, cloud, security and network architecture diagrams as self-contained HTML files with inline SVG and CSS.

    7.4k GitHub starsUsed in 1 repo~2.1k tokens
    DevelopmentAuto-check passed
  • Deepwiki Rs

    sopaco/deepwiki-rs

    AI-powered Rust documentation generation engine for comprehensive codebase analysis, C4 architecture diagrams, and automated technical documentation.

    3.1k GitHub stars~748 tokensUpdated 23 days ago
    DevelopmentAuto-check passed
  • Mermaid Diagrams

    jjmartres/opencode

    Helps an agent pick the right Mermaid diagram type and write the syntax for class, sequence, flow, ER, C4, state and other software diagrams.

    133 GitHub starsUsed in 6 repos~1.9k tokens
    DevelopmentAuto-check passed
  • C4 Architecture Diagrams

    lexler/skill-factory

    Creates C4 model diagrams at every zoom level, from system landscape to code, in ASCII, Mermaid or Structurizr, for designing or documenting software architecture.

    239 GitHub stars~2.3k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • MVP Technical Design

    KhazP/vibe-coding-prompt-template

    Writes an MVP technical design from agreed requirements, covering architecture, data ownership, integration contracts, deployment and tradeoffs, then hands off to the next stage.

    3.1k GitHub stars~512 tokensUpdated 3 days ago
    DevelopmentAuto-check passed
  • Reverse Engineering Analysis Pipeline

    prime-radiant-inc/greenfield

    Master methodology for reverse-engineering a codebase into behavioral specs with cited evidence, reading every line across source, binaries, docs, runtime and git history.

    292 GitHub stars~3.6k tokensUpdated 2 mo ago
    DevelopmentAuto-check passed

More from shift-editor/shift

All 14 skills in this repo
  • Shift Commit Rules

    shift-editor/shift

    Rules for writing git commits in the Shift font editor repo: Conventional Commits subjects, user-facing changelog wording, concise subjects and logical commit boundaries.

    343 GitHub stars~1.4k tokensUpdated yesterday
    Auto-check: notes
  • Dead Code Removal with Knip

    shift-editor/shift

    Finds unused files, exports and class members with Knip, then verifies each candidate through reference tracing before removing anything, never using knip --fix.

    343 GitHub stars~1.8k tokensUpdated yesterday
    Auto-check passed
  • Adversarial Docs Audit

    shift-editor/shift

    Fact-checks DOCS.md files against the source code, testing each concrete claim and sorting it as true, false, stale or unverifiable.

    343 GitHub stars~818 tokensUpdated yesterday
    Auto-check passed
  • Shift Issue Writer

    shift-editor/shift

    Sets the rules for finding, writing and updating Shift GitHub issues: search for duplicates first, use outcome-focused titles and testable acceptance criteria.

    343 GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed
  • Shift JSDoc Contracts

    shift-editor/shift

    Guides writing JSDoc for Shift exported APIs as a stable caller contract, covering ownership, lifetime, side effects and nullability that TypeScript types cannot express.

    343 GitHub stars~3.7k tokensUpdated yesterday
    Auto-check passed
  • Shift Pull Request Rules

    shift-editor/shift

    Rules for preparing, opening and updating pull requests in the Shift repository: Conventional Commit titles, Release Please effects, evidence-based bodies and UI screenshots.

    343 GitHub stars~2.1k tokensUpdated yesterday
    Auto-check: notes

Questions about Shift Subsystem Docs

What does Shift Subsystem Docs do?

Updates or creates DOCS.md files for Shift subsystems, recording the architecture invariants and constraints that cannot be learned from reading the source. md if there is one, and the module source to see what changed.md.

When should I use Shift Subsystem Docs?

Shift Subsystem Docs fits situations like: refreshing a subsystem's DOCS.md after a large feature lands; creating a DOCS.md for a module that has none; writing architecture invariants that explain why a rule exists.

How do I install Shift Subsystem Docs in Claude Code?

Run `npx skills add shift-editor/shift --skill docs -a claude-code`. Or copy the skill folder (.claude/skills/docs in shift-editor/shift) into .claude/skills/docs in your project. Claude Code loads it when a task matches its description.

How do I install Shift Subsystem Docs in Codex?

Run `npx skills add shift-editor/shift --skill docs -a codex`. Or copy the skill folder (.claude/skills/docs in shift-editor/shift) into .agents/skills/docs in your project. Codex loads it when a task matches its description.

Can I use Shift Subsystem Docs 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 shift-editor/shift --skill docs -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/docs, .gemini/skills/docs, .github/skills/docs and .opencode/skills/docs in your project.

What does Shift Subsystem Docs need to run?

Going by SKILL.md and its folder, Shift Subsystem Docs needs the command-line tools its instructions call (python3 and node). Our summary lists: A checkout of the Shift repository with its docs/architecture index.

Does Shift Subsystem Docs 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 Shift Subsystem Docs 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 Shift Subsystem Docs use?

Shift Subsystem Docs is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Shift Subsystem Docs use?

About 1.9k tokens (SKILL.md is roughly 7.5k 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 Shift Subsystem Docs?

Skills that share tags, products or a category with Shift Subsystem Docs: Dark Architecture Diagram Builder (Cocoon-AI/architecture-diagram-generator, 7.4k stars), Deepwiki Rs (sopaco/deepwiki-rs, 3.1k stars), Mermaid Diagrams (jjmartres/opencode, 133 stars) and C4 Architecture Diagrams (lexler/skill-factory, 239 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Shift Subsystem Docs?

shift-editor (a GitHub organization) maintains it in shift-editor/shift, which has 343 GitHub stars. The repository holds 14 skills in this directory. The repository was last updated on October 6, 2026.

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