Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Docs

ASecurity

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.

274 stars
0 votes
0 copies
1 views
Added 9/20/2026
developmenttypescriptpythonrustgoreactnodeapiperformancedocumentation

Works with

cliapi

Security Analysis

A100/100

Scanned 9/20/2026

Install to Claude Code

$npx -y skills add shift-editor/shift --skill docs --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Docs?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Docs
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/shift-editor-docs/badge)](https://www.skillsdirectory.com/skills/shift-editor-docs)

More formats (shields.io, HTML) on the badges page.

Download with Pro
Files
SKILL.md
---
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.

### Related

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.

## 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

Attribution

shift-editorshift-editor
View sourceMore from shift-editor →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Browser Extension Developer

Use this skill when developing or maintaining browser extension code in the `browser/` directory, including Chrome/Firefox/Edge compatibility, content scripts, background scripts, or i18n updates.

284972 votes

Seo Optimizer

SEO optimization with keyword analysis, readability assessment, technical validation, content quality. Use for search rankings, blog posts, content audits, or encountering keyword density, readability scores, meta tags, schema markup errors.

2222 votes

Google Official Seo Guide

Official Google SEO guide covering search optimization, best practices, Search Console, crawling, indexing, and improving website search visibility based on official Google documentation

1862 votes

Tanstack Start

Build a full-stack TanStack Start app on Cloudflare Workers from scratch — SSR, file-based routing, server functions, D1+Drizzle, better-auth, Tailwind v4+shadcn/ui. Use whenever the user mentions TanStack Start, asks to scaffold a full-stack Cloudflare app with SSR, wants an SSR dashboard, or asks for a React 19 + Cloudflare Workers app with file-based routing and server functions — even if they don't name TanStack Start specifically. No template repo — Claude generates every file fresh per ...

10311 votes

Pentest

PTES-aligned adversarial security audit for backend, frontend, and mobile applications. Produces a CVSS-scored Hacker Report with verified PoCs and phased remediation.

5491 votes
View all in development →