polish-docs-meta
Skill0 starsChanged 6 months agoApache-2.0View on GitHub
Finalize documentation and project metadata for a ship-ready MCP server. Use after implementation is complete, tests pass, and devcheck is clean. Safe to run at any stage — each step checks current state and only acts on what still needs work.
- Reads credentials
In this repository31 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- add-app-toolSkill
- add-promptSkill
- add-resourceSkill
- add-serviceSkill
- add-testSkill
- add-toolSkill
- api-authSkill
- api-canvasSkill
- api-configSkill
- api-contextSkill
- api-errorsSkill
- api-linterSkill
- api-mirrorSkill
- api-servicesSkill
- api-telemetrySkill
- api-testingSkill
- api-utilsSkill
- api-workersSkill
- code-simplifierSkill
- design-mcp-serverSkill
- field-testSkill
- git-wrapupSkill
- maintenanceSkill
- release-and-publishSkill
- report-issue-frameworkSkill
- report-issue-localSkill
- security-passSkill
- setupSkill
- tool-defs-analysisSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
30 rules. About 0 are common, 9 are distinctive, and 21 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
21
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
Prefer running after implementation is complete, but safe to re-run at any point — steps are idempotent.
- Distinctive: line 30
If these aren't met, address them first.
- Distinctive: line 36
Read all tool, resource, and prompt definitions.
- Very specific: line 41
All files in src/mcp-server/tools/definitions/
- Very specific: line 44
All files in src/services/ (if any)
- Very specific: line 57
Update the project's agent protocol file to reflect the actual server.
- Very specific: line 59
Read references/agent-protocol.md for the full update checklist, then review the current file and address what's stale or missing:
- Distinctive: line 61
If a "First Session" onboarding block is still present and onboarding is complete, it can go
- Very specific: line 62
If example patterns still use generic/template names (e.g., searchItems, itemData), replace with real definitions from this server
- Distinctive: line 63
If server-specific skills were added, update the skills table
- Distinctive: line 64
Verify the structure diagram matches the actual directory layout
- Very specific: line 65
If custom scripts were added to package.json, update the commands table
- Very specific: line 73
Check for empty or placeholder metadata fields.
- Very specific: line 79
descriptionis the canonical source: Every other surface (README header, server.json, Dockerfile OCI label, GitHub repo description) … - Very specific: line 83
Read references/server-json.md for the official MCP server manifest schema.
- Very specific: line 114
Verify a bunfig.toml exists at the project root.
- Distinctive: line 138
If the structure doesn't exist yet:
- Very specific: line 141
Create changelog/template.md once from the template (frontmatter stub + H1 # <version> — YYYY-MM-DD placeholder + empty Added/Changed/Fixed …
- Very specific: line 142
If the server already has a shipped version (e.g.
- Very specific: line 143
Run bun run changelog:build to generate CHANGELOG.md
- Very specific: line 164
Never hand-edit CHANGELOG.md when using this pattern — it's a build artifact.
- Very specific: line 170
If .codex-plugin/plugin.json exists, verify it's populated and in sync with package.json and server.json:
- Very specific: line 181
If .codex-plugin/mcp.json exists, verify the server name key matches package.json name and env vars include any required API keys from the …
- Very specific: line 183
If .claude-plugin/plugin.json exists, apply the same checks: name, version, description, repository, license from package.json.
- Very specific: line 187
If the project ships as an .mcpb bundle for Claude Desktop (check for manifest.json at the project root), verify the full artifact set is …
- Very specific: line 212
If manifest.json exists, the README should include the Claude Desktop install badge linking to releases/latest/download/<name>.mcpb
- Distinctive: line 213
If the package is published to npm, include Cursor and VS Code install badges
- Very specific: line 222
If a Dockerfile exists, verify the OCI labels and runtime config match the actual server:
- Very specific: line 229
If no Dockerfile exists and the server is deployed via HTTP transport, consider scaffolding one — the template is available via npx …
- Distinctive: line 243
Run the full check suite one last time:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.
Files
When to Use
- Server implementation is functionally complete (tools, resources, prompts, services all working)
bun run devcheckpasses, tests pass- You're preparing for first commit, first release, or making the repo public
- User says "polish", "polish docs", "finalize", "make it ship-ready", "clean up docs", or similar
- Re-running after adding/removing tools, resources, or other surface area changes
Prefer running after implementation is complete, but safe to re-run at any point — steps are idempotent.
Companion: pair with security-pass for a full pre-ship review — this skill polishes docs and metadata; security-pass audits handlers for MCP-specific security gaps.
Prerequisites
- All tools/resources/prompts implemented and registered
bun run devcheckpasses- Tests pass (
bun run test)
If these aren't met, address them first.
Steps
1. Audit the Surface Area
Read all tool, resource, and prompt definitions. Build a mental model of what the server actually does — names, descriptions, input/output shapes, auth scopes. This inventory drives every document below.
Read:
src/index.ts(what's registered increateApp())- All files in
src/mcp-server/tools/definitions/ - All files in
src/mcp-server/resources/definitions/ - All files in
src/mcp-server/prompts/definitions/ - All files in
src/services/(if any) src/config/server-config.ts(if any)
Capture: tool count, resource count, prompt count, service count, required env vars.
2. README.md
Read references/readme.md for structure and conventions. If README.md doesn't exist, create it from scratch. If it exists, diff the current content against the audit — update tool/resource/prompt tables, env var lists, and descriptions to match the actual surface area. Don't rewrite sections that are already accurate.
The bold header tagline (the <b> text inside the first <p>) must match the package.json description. The surface count is a nested <div> inside the same <p>, separated by •.
3. Agent Protocol (CLAUDE.md / AGENTS.md)
Update the project's agent protocol file to reflect the actual server. Scope is the project-root CLAUDE.md / AGENTS.md only — do not edit skills/*/SKILL.md or their references/ files. Those are external skill files synced from @cyanheads/mcp-ts-core and get overwritten on the next maintenance refresh.
Read references/agent-protocol.md for the full update checklist, then review the current file and address what's stale or missing:
- If a "First Session" onboarding block is still present and onboarding is complete, it can go
- If example patterns still use generic/template names (e.g.,
searchItems,itemData), replace with real definitions from this server - If server-specific skills were added, update the skills table
- Verify the structure diagram matches the actual directory layout
- If custom scripts were added to
package.json, update the commands table
4. .env.example
Compare .env.example against the server config Zod schema. Add any missing server-specific vars with a comment and default (if any). Remove vars for features that no longer exist. Group by category. Preserve existing framework vars that are still relevant.
5. package.json Metadata
Check for empty or placeholder metadata fields. Read references/package-meta.md for which fields matter and why. Fill in anything still missing — skip fields that are already correct.
Key fields: name, description, repository, author, homepage, bugs, keywords.
name must communicate the server's domain at a glance. See references/package-meta.md for the naming convention — ambiguous abbreviations and acronym-only names fail the scannability test for humans and agents alike.
description is the canonical source. Every other surface (README header, server.json, Dockerfile OCI label, GitHub repo description) derives from it. Write it here first, then propagate.
6. server.json
Read references/server-json.md for the official MCP server manifest schema. If server.json doesn't exist, create it from the surface area audit. If it exists, diff against current state and update stale fields.
Key sync points:
$schemaset tohttps://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.jsonnamematchesmcpNamefrompackage.json(reverse-domain:io.github.{owner}/{repo})versionmatchespackage.jsonversion (in all three places: top-level + each package entry)descriptionmatchespackage.jsondescriptionenvironmentVariablesreflect the server config Zod schema — server-specific required vars in both entries, transport vars only in HTTP entry- Two package entries: one for stdio, one for HTTP (if both transports supported)
7. GitHub Repository Metadata
Sync the GitHub repo with package.json using the gh CLI. Skip if the repo isn't hosted on GitHub or gh isn't available.
Description:
gh repo edit <owner>/<repo> --description "<package.json description>"Topics ↔ Keywords:
Compare GitHub topics (gh repo view --json repositoryTopics) against package.json keywords. They should be the union — add any that exist in one but not the other:
- Missing from GitHub →
gh repo edit --add-topic <topic> - Missing from
package.json→ add tokeywordsarray
Common keywords shared across MCP servers (e.g., mcp, mcp-server, model-context-protocol, typescript) should appear in both. Domain-specific keywords should also be present in both.
8. bunfig.toml
Verify a bunfig.toml exists at the project root. If not, create one:
[install]
auto = "fallback"
frozenLockfile = false
[run]
bun = true9. Changelog
Two patterns are supported — pick one and stay consistent.
| Pattern | Best for |
| Directory-based (template default) | Published libraries, or servers whose consumers run the maintenance skill against them — per-version files ship inside node_modules/<pkg>/changelog/<minor>.x/<version>.md for direct agent inspection. |
Monolithic CHANGELOG.md | Runtime-only consumer servers where nobody imports types and nobody runs maintenance against the package — skips the build step and devcheck drift gate. |
Both are acceptable. The template scaffolds the directory-based structure by default; collapse to monolithic only if the rollup tooling is pure ceremony for this project.
Directory-based — per-version files live at changelog/<major.minor>.x/<version>.md (e.g. changelog/0.1.x/0.1.0.md), and CHANGELOG.md is a rollup regenerated by bun run changelog:build. Devcheck's Changelog Sync step enforces drift protection. changelog/template.md is a pristine format reference — never edited, never moved, never renamed. Read it to remember the frontmatter + section layout when scaffolding a new per-version file.
If the structure doesn't exist yet:
- Make the
changelog/directory - Create
changelog/template.mdonce from the template (frontmatter stub + H1# <version> — YYYY-MM-DDplaceholder + empty Added/Changed/Fixed sections) — this file is a format reference only and stays as-is after creation - If the server already has a shipped version (e.g. 0.1.0), create the series directory and initial entry:
changelog/0.1.x/0.1.0.mdwith H1# 0.1.0 — YYYY-MM-DD, concrete version and date — do not rename or movetemplate.mdto create the version file; author the per-version file directly - Run
bun run changelog:buildto generateCHANGELOG.md
Per-version file format:
---
summary: One-line headline for the rollup index — ≤350 chars, no markdown
breaking: false
---
# 0.1.0 — YYYY-MM-DD
Optional narrative intro (1-3 sentences).
## Added
- [list tools, resources, prompts, key capabilities]Frontmatter: summary is required (powers the CHANGELOG.md index), breaking is optional and defaults to false (set true for releases requiring consumer code changes).
Never hand-edit CHANGELOG.md when using this pattern — it's a build artifact. Never edit changelog/template.md — it's the format reference. Never use [Unreleased] as a version header in a released file.
Monolithic — maintain CHANGELOG.md directly in Keep a Changelog format. To collapse from the template default: delete the changelog/ directory, remove changelog:build and changelog:check from package.json scripts (and from devcheck.config.json if referenced), and drop "changelog/" from the files array. The release skill's directory-specific steps then don't apply — just edit CHANGELOG.md and bump version at release time.
10. Plugin Metadata (Codex / Claude Code)
If .codex-plugin/plugin.json exists, verify it's populated and in sync with package.json and server.json:
namematchespackage.jsonnameversionmatchespackage.jsonversiondescriptionmatchespackage.jsondescriptionrepositorymatchespackage.jsonrepository.urllicensematchespackage.jsonlicenseinterface.displayName=package.jsonnameinterface.shortDescriptionmatchespackage.jsondescriptioninterface.categoryis set to a meaningful category
If .codex-plugin/mcp.json exists, verify the server name key matches package.json name and env vars include any required API keys from the server config schema.
If .claude-plugin/plugin.json exists, apply the same checks: name, version, description, repository, license from package.json. Verify the inline mcpServers entry key matches package.json name and env vars include any required API keys.
11. MCPB Bundling Artifacts
If the project ships as an .mcpb bundle for Claude Desktop (check for manifest.json at the project root), verify the full artifact set is present and consistent. If the project doesn't ship .mcpb bundles, skip this step.
Files that must exist:
manifest.json— MCPB manifest withmcp_config.env,user_config, and metadata.mcpbignore— controls what's excluded from the bundle
package.json scripts:
bundle— builds the.mcpb(e.g.,mcpb pack --output dist/)lint:packaging— validatesmanifest.json↔server.jsonenv var consistency (run bydevcheck)
Cross-file consistency:
manifest.jsonversion matchespackage.jsonversion- Env var names in
manifest.json(mcp_config.env+user_config) matchserver.jsonenvironmentVariables—lint:packagingenforces this, but verify the set is complete manifest.jsonnamematchespackage.jsonname without the npm scope prefix (e.g.bls-mcp-server, not@cyanheads/bls-mcp-server);descriptionmatchespackage.jsonmanifest.jsonuser_configentries must includetitleandtypefields —mcpb packvalidates these- For each
user_configentry referenced as${user_config.X}inmcp_config.env: if it's notrequired: true, set"default": "". MCPB hosts (Claude Desktop included) pass the literal placeholder string through to the process when an optional field is left blank without a default — strict consumer validators (z.email(),z.url(),.regex()) then crash at lazy config load, exiting silently afterinitialize. Server-side: pair every optional env-backed strict-validator field with az.preprocessthat strips${...}placeholders toundefined. server.jsonenv varisRequiredmust match the upstream API's actual requirement — if the API works without the value (rate-limited, DEMO_KEY fallback, polite pool), markisRequired: falseand describe the tradeoff in the description- Server description aligned across all surfaces:
package.json,manifest.json,server.json(condensed, hard 100-char limit), README header<p><b>, and GitHub repo description (gh repo edit --description) package.jsonkeywordsinclude baseline terms:mcp,mcp-server,model-context-protocol,typescript,bun,stdio,streamable-http, plus data-domain terms. GitHub repo topics (gh repo edit --add-topic) should match.
README install badges:
- If
manifest.jsonexists, the README should include the Claude Desktop install badge linking toreleases/latest/download/<name>.mcpb - If the package is published to npm, include Cursor and VS Code install badges
- See
references/readme.mdfor badge format and config generation commands
12. LICENSE
Confirm a license file exists. If not, ask the user which license to use (default: Apache-2.0, matching the scaffolded package.json). Create the file.
13. Dockerfile
If a Dockerfile exists, verify the OCI labels and runtime config match the actual server:
org.opencontainers.image.titlematches the package nameorg.opencontainers.image.descriptionmatchespackage.jsondescriptionorg.opencontainers.image.sourcepoints to the real repository URL (add if missing)- Log directory path in
mkdirandLOGS_DIRuses the correct server name
If no Dockerfile exists and the server is deployed via HTTP transport, consider scaffolding one — the template is available via npx @cyanheads/mcp-ts-core init.
14. docs/tree.md
Regenerate the directory structure:
bun run treeReview the output for anything unexpected (leftover files, missing directories).
15. Final Verification
Run the full check suite one last time:
bun run devcheck
bun run testBoth must pass clean.
Checklist
- Surface area audited — tool/resource/prompt/service inventory built
README.mdaccurate — tool/resource tables, config, descriptions match actual code- Agent protocol file accurate — no stale template content, real examples, structure matches reality
.env.examplein sync with server config schemapackage.jsonmetadata complete (description,mcpName,repository,author,keywords,engines,packageManager)server.jsonmatches official MCP schema, versions synced, env vars current- GitHub repo description matches
package.jsondescription; topics ↔ keywords in sync bunfig.tomlpresent- Changelog current — either monolithic
CHANGELOG.md(hand-edited, Keep a Changelog) or directory-based (changelog/<minor>.x/<version>.md+ rollup regenerated and in sync) .codex-plugin/plugin.jsonpopulated and in sync withpackage.json(if present).codex-plugin/mcp.jsonserver name and env vars current (if present).claude-plugin/plugin.jsonpopulated and in sync withpackage.json(if present)- MCPB artifacts consistent (if
manifest.jsonpresent) — version synced, env vars matchserver.json,bundle+lint:packagingscripts exist, README install badges present LICENSEfile presentDockerfileOCI labels and runtime config accurate (if present)docs/tree.mdregeneratedbun run devcheckpassesbun run testpasses
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
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.

