skills/update-readme/SKILL.md
--- name: update-readme description: Updates a project README.md with build instructions, unit test instructions, and a mermaid architecture diagram. Use when a project README needs to be created or refreshed. Trigger phrases: "update readme", "generate readme", "create readme", "refresh readme docs". Emphasizes project interfaces, extension points, and customization hooks in the diagram — not concrete implementations. Do NOT use for documentation sites, wikis, or non-project READMEs. argument-h
npx skillsauth add armandli/get-skilled skills/update-readmeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are generating a high-quality README.md for a software project. Follow these steps precisely.
Use $ARGUMENTS as the project root if provided, otherwise use ${PWD}.
Set PROJECT_ROOT to that path. All subsequent file operations are relative to it.
Read the project name from:
package.json → "name" fieldpyproject.toml or setup.py → project nameCargo.toml → [package] namepom.xml → <artifactId>CMakeLists.txt → project(...) callScan for build files in this priority order. For each match, derive the canonical build command(s):
| File | Build command |
|------|---------------|
| Makefile | make or make all (check default target) |
| CMakeLists.txt | cmake -B build && cmake --build build |
| pyproject.toml (with [build-system]) | pip install -e . or python -m build |
| setup.py | pip install -e . |
| Cargo.toml | cargo build / cargo build --release |
| package.json (scripts.build) | npm run build or yarn build |
| build.gradle | ./gradlew build |
| pom.xml | mvn package |
Read the actual file to confirm commands rather than guessing. If a Makefile exists, scan its top-level targets. If a README already exists, do NOT copy its content—generate fresh.
Scan for test configurations:
| Indicator | Test command |
|-----------|--------------|
| Makefile with test target | make test |
| pytest.ini, pyproject.toml [tool.pytest], conftest.py | pytest |
| setup.cfg with [tool:pytest] | pytest |
| Cargo.toml | cargo test |
| package.json scripts.test | npm test or yarn test |
| jest.config.* | npx jest |
| build.gradle | ./gradlew test |
| pom.xml | mvn test |
| CMakeLists.txt with enable_testing() | cmake --build build && ctest --test-dir build |
Read actual Makefile targets or config files to confirm. Note any environment variables or prerequisites (e.g., pip install -e .[test] before running pytest).
Recursively explore the source tree. Focus on:
Interfaces and extension points (these are PRIMARY diagram nodes):
interface, abstract class, type (when used as structural contracts)Protocol, ABC/ABCMeta, classes with @abstractmethod, base classes ending in Base or Abstractinterface, abstract classtraitinterface= 0), base classes in headersBriefly note (SECONDARY diagram nodes):
Ignore (omit from diagram):
Detecting auto-generated files — check BEFORE reading:
Skip any file that matches one or more of the following signals:
File-header comment (check the first ~5 lines):
// Code generated / /* Code generated// DO NOT EDIT / /* DO NOT EDIT// AUTO-GENERATED / # AUTO-GENERATED# Generated by / // Generated by// @generated / /* @generated# This file is auto-generated / similar phrasingDirectory name — skip entire subtrees whose name is:
generated/, gen/, dist/, build/, out/, target/,
__generated__/, .generated/, node_modules/, vendor/,
__pycache__/, .cache/, migrations/ (auto-migration tools),
pb/, proto_out/, grpc_out/
File-name pattern:
*.pb.go, *_pb2.py, *_pb2_grpc.py (protobuf)*_generated.go, *_gen.go, zz_generated_*.go (Go code-gen)*.g.dart, *.freezed.dart, *.gr.dart (Dart code-gen)*.g.cs, *.designer.cs (.NET designer/source-gen)schema.graphql or *.generated.ts when produced by a codegen tool__generated__/*.ts / __generated__/*.js (GraphQL codegen)*.auto.tfvars, override.tf (Terraform)Makefile.in, configure, aclocal.m4 (autoconf output)Apply these checks with Glob (directory exclusions) and by reading only the first few lines of candidate files before deciding to include them.
Use Glob and Grep tools to find interface/abstract definitions efficiently. Read key files to understand relationships.
Construct a classDiagram (preferred) or graph TD (for simpler projects).
Rules:
<<interface>>, <<abstract>>, <<protocol>> stereotypes in classDiagram.<<external>> or note them as external.--|> for inheritance, ..|> for interface implementation, --> for dependency/usage.note annotations if helpful.Example skeleton:
classDiagram
class Processor {
<<interface>>
+process(input: Input) Output
+validate(input: Input) bool
}
class BaseProcessor {
<<abstract>>
+process(input: Input) Output
#doProcess(input: Input) Output*
}
class Plugin {
<<interface>>
+name() string
+execute(ctx: Context) void
}
BaseProcessor ..|> Processor
ConcreteProcessor --|> BaseProcessor
note for Plugin "Extension point: implement to add custom processing steps"
Write README.md at PROJECT_ROOT/README.md with this exact structure:
# <Project Name>
<One or two sentence description of what the project does. Derive from package metadata, existing docs, or top-level source comments. Keep it factual.>
## Building
<Prerequisites if any (e.g., "Requires CMake 3.20+, a C++17 compiler")>
```sh
<build command(s)>
<Prerequisites if any (e.g., "Install test dependencies first: pip install -e .[test]")>
<test command(s)>
The diagram below shows the primary interfaces, protocols, and extension points defined in this project. Concrete implementations and external dependencies are shown for context only.
<diagram here>
<For each primary interface/abstract class in the diagram, one bullet:>
InterfaceName — what it represents and why it's an extension point
**Writing rules:**
- Do NOT include a license section unless a LICENSE file exists.
- Do NOT include a "Contributing" section unless a CONTRIBUTING.md exists.
- Do NOT pad with filler text or marketing language.
- If a section genuinely has no content (e.g., no interfaces found), write a minimal honest note rather than fabricating content.
- Overwrite any existing README.md without asking.
---
## Final Step — Record Usage
After the skill's primary task completes, run:
```bash
python3 ${PWD}/.claude/skills/skill-stat/scripts/record-stat.py "update-readme"
business
--- name: skill-stat description: Records skill usage statistics and issue reports into .claude/skill-stats.md. Increments the Uses count for a skill name, and optionally logs an issue report that increments the Issues count and appends a row to the Issue Reports table. Use when tracking how often a skill is invoked, when a user reports a problem with a skill, or when another skill needs to log its own usage. Trigger phrases: "record skill stat", "log skill usage", "report skill issue". Do NOT u
testing
--- name: revert description: Reverts ALL git changes in the working directory: staged changes, unstaged modifications, and new untracked files. Use when user asks to "revert all changes", "undo all changes", "discard all changes", "reset all git changes", or "clean working directory". Do NOT use for reverting a specific file or a specific commit — those need targeted git commands. disable-model-invocation: true --- Revert all git changes in the working directory. This is destructive and cannot
tools
Scans a Python codebase for duplicate or near-duplicate logic patterns across functions, classes, and files, then extracts those patterns into typed utility classes in a shared module. Use when the user asks to "refactor this Python code", "find duplicate logic", "extract shared utilities", "apply DRY to Python", "deduplicate Python code", or "find repeated patterns in Python". Groups extracted helpers by the object type they operate on (strings, numbers, dates, collections, etc.). Do NOT use for performance optimization (use optimize-python), for debugging logic errors, or for explaining code. Do NOT extract code that appears only once. Run this skill before optimize-python.
tools
Scans a C++ codebase for duplicate or near-duplicate logic patterns across .cpp and .h files, then extracts them into reusable utility functions in a shared utils/ directory. Use when the user asks to "refactor this C++ code", "find duplicate logic in C++", "extract shared C++ utilities", "apply DRY to C++", "deduplicate C++ code", or "find repeated patterns in C++". Groups extracted helpers by the object type they operate on (strings, numbers, containers, etc.). Template functions are placed in .h headers only; non-template utilities get a .h declaration and a .cpp definition. Do NOT use for performance optimization, debugging logic errors, code formatting (use format-cpp), or explaining code. Do NOT extract code that appears only once. Run this skill before format-cpp.