From epieczko-betty
Automatically regenerate README.md from Betty Framework registries
npx claudepluginhub joshuarweaver/cascade-code-general-misc-1 --plugin epieczko-bettyThis skill uses the workspace's default tool permissions.
**docs.sync.readme** is the documentation synchronization tool that regenerates the top-level `README.md` to reflect all current registered skills and agents. It ensures that the README stays in sync with the actual state of the Betty Framework by pulling from registry files.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
docs.sync.readme is the documentation synchronization tool that regenerates the top-level README.md to reflect all current registered skills and agents. It ensures that the README stays in sync with the actual state of the Betty Framework by pulling from registry files.
Automates the maintenance of README.md to keep documentation accurate and up-to-date with:
registry/skills.json) – All registered skillsregistry/agents.json) – All registered agentsThis eliminates manual editing of the README and prevents documentation drift as skills and agents are added, modified, or removed.
skills.json and agents.jsonpython skills/docs.sync.readme/readme_sync.py
No arguments required - reads from standard registry locations.
/docs/sync/readme
betty/
├── registry/
│ ├── skills.json # Skills registry
│ └── agents.json # Agents registry
└── README.md # File to update
Reads JSON files from:
registry/skills.json – Skills registryregistry/agents.json – Agents registryIf a registry file is missing, logs a warning and continues with empty data.
Foundation Skills:
skill.*, registry.*, workflow.*skill.create, workflow.composeAPI Development Skills:
api.* or tags: api, openapi, asyncapiapi.define, api.validateInfrastructure Skills:
agents, command, hook, policy, pluginagent.define, hook.register, plugin.syncGovernance Skills:
governance, policy, auditpolicy.enforce, audit.logOnly active skills are included. Test skills (starting with test.) are filtered out.
Replaces the "## 🧩 Current Core Skills" section with:
## 🧩 Current Core Skills
Betty's self-referential "kernel" of skills bootstraps the rest of the system:
### Foundation Skills
| Skill | Purpose |
|--------|----------|
| **skill.create** | Generates a new Betty Framework Skill directory and manifest. |
| **skill.define** | Validates and registers skill manifests (.skill.yaml) for the Betty Framework. |
| **registry.update** | Updates the Betty Framework Skill Registry by adding or modifying entries. |
### API Development Skills
| Skill | Purpose |
|--------|----------|
| **api.define** | Create OpenAPI and AsyncAPI specifications from templates |
| **api.validate** | Validate OpenAPI and AsyncAPI specifications against enterprise guidelines |
### Infrastructure Skills
| Skill | Purpose |
|--------|----------|
| **agent.define** | Validates and registers agent manifests for the Betty Framework. |
| **hook.define** | Create and register validation hooks for Claude Code |
These skills form the baseline for an **AI-native SDLC** where creation, validation, registration, and orchestration are themselves skills.
Updates the "### Agents Documentation" subsection with current agents:
### Agents Documentation
Each agent has a `README.md` in its directory:
* [api.designer](agents/api.designer/README.md) — Design RESTful APIs following enterprise guidelines with iterative refinement
* [api.analyzer](agents/api.analyzer/README.md) — Analyze API specifications for backward compatibility and breaking changes
Includes both active and draft agents.
Creates sync_report.json with statistics:
{
"skills_by_category": {
"foundation": 5,
"api": 4,
"infrastructure": 9,
"governance": 1
},
"total_skills": 19,
"agents_count": 2,
"timestamp": "2025-10-23T20:30:00.123456+00:00"
}
{
"ok": true,
"status": "success",
"readme_path": "/home/user/betty/README.md",
"report": {
"skills_by_category": {
"foundation": 5,
"api": 4,
"infrastructure": 9,
"governance": 1
},
"total_skills": 19,
"agents_count": 2,
"timestamp": "2025-10-23T20:30:00.123456+00:00"
}
}
{
"ok": false,
"status": "failed",
"error": "README.md not found at /home/user/betty/README.md"
}
The skill only updates specific documentation sections while preserving all other README content.
Scenario: You've added several new skills and want to update the README
# Create and register new skills
/skill/create data.transform "Transform data between formats"
/skill/define skills/data.transform/skill.yaml
/skill/create telemetry.report "Generate telemetry reports"
/skill/define skills/telemetry.report/skill.yaml
# Sync README to include new skills
/docs/sync/readme
Output:
INFO: Starting README.md sync from registries...
INFO: Loading registry files...
INFO: Generating updated README content...
INFO: ✅ Updated README.md
INFO: - Foundation skills: 5
INFO: - API skills: 4
INFO: - Infrastructure skills: 11
INFO: - Governance skills: 1
INFO: - Total active skills: 21
INFO: - Agents: 2
Scenario: A new agent has been registered and needs to appear in README
# Define new agent
/agent/define agents/workflow.optimizer/agent.yaml
# Sync README
/docs/sync/readme
The new agent will appear in the "### Agents Documentation" section.
Scenario: Include README sync as a workflow step after registering skills
# workflows/skill_release.yaml
steps:
- skill: skill.define
args: ["skills/new.skill/skill.yaml"]
- skill: plugin.sync
args: []
- skill: docs.sync.readme
args: []
This ensures README, plugin.yaml, and registries stay in sync.
After defining skills, sync the README:
/skill/define skills/my.skill/skill.yaml
/docs/sync/readme
After defining agents, sync the README:
/agent/define agents/my.agent/agent.yaml
/docs/sync/readme
Auto-sync README when registries change:
# .claude/hooks.yaml
- event: on_file_save
pattern: "registry/*.json"
command: python skills/docs.sync.readme/readme_sync.py
blocking: false
description: Auto-sync README when registries change
Chain both sync operations:
/plugin/sync && /docs/sync/readme
Criteria:
skill., registry., workflow.Examples:
skill.create, skill.defineregistry.update, registry.queryworkflow.compose, workflow.validateCriteria:
api.api, openapi, asyncapiExamples:
api.define, api.validateapi.generate-models, api.compatibilityCriteria:
agents, command, hook, policy, plugin, registryExamples:
agent.define, agent.runhook.define, hook.registerplugin.sync, plugin.buildCriteria:
governance, policy, auditExamples:
policy.enforceaudit.logstatus: activestatus: active or status: draftstatus: drafttest.| Error | Cause | Solution |
|---|---|---|
| "README.md not found" | Missing README file | Ensure README.md exists in repo root |
| "Registry file not found" | Missing registry | Run skill.define to populate registry |
| "Failed to parse JSON" | Invalid JSON | Fix JSON syntax in registry files |
README.md – Current README contentregistry/skills.json – Skills registryregistry/agents.json – Agents registryREADME.md – Updated with current skills and agentsskills/docs.sync.readme/sync_report.json – Sync statisticsLogs sync progress:
INFO: Starting README.md sync from registries...
INFO: Loading registry files...
INFO: Generating updated README content...
INFO: ✅ Updated README.md
INFO: - Foundation skills: 5
INFO: - API skills: 4
INFO: - Infrastructure skills: 9
INFO: - Governance skills: 1
INFO: - Total active skills: 19
INFO: - Agents: 2
Problem: Changes to registry don't appear in README
Solutions:
status: active/skill/define before syncing READMEProblem: Skill appears in unexpected category
Solutions:
Problem: "Section marker not found" warnings
Solutions:
Documentation – docs.sync.readme maintains the README documentation layer by syncing registry state to the top-level README.
Active – Production-ready documentation skill