Agent skill

Skill Based Architecture

by WoJiSama in WoJiSama/skill-based-architecture

This skill should be used when the user asks to "organize the project rules", "clean up scattered documentation", "把规则迁移到 skills 目录", "优化 skill 路由", "提高 description 命中率", or "减少薄壳重复维护".

MITAuto-check passedAgent Workflows

Install Skill Based Architecture

skills CLI
$ npx skills add WoJiSama/skill-based-architecture --skill skill-based-architecture -a claude-code

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

GitHub CLI
$ gh skill install WoJiSama/skill-based-architecture skill-based-architecture --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
skill-based-architecture
GitHub stars
607
Token cost
~3.2k tokens
SKILL.md length
1,489 words
Files
224 (incl. scripts, references, assets)
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

This skill should be used when the user asks to "organize the project rules", "clean up scattered documentation", "把规则迁移到 skills 目录", "优化 skill 路由", "提高 description 命中率", or "减少薄壳重复维护".

  • Works in 12 steps: Single concise entry — SKILL.md keeps a… → One skill folder when a folder is… → Rules ≠ Flows — rules/ for constraints,… → …
  • Asks to organize the project rules
  • SKILL.md covers When to Use, Progressive Rigor, Evidence-Selected Structure and Core Principles, plus 4 more sections
  • Clean up scattered documentation

What it does

Skill Based Architecture is an agent skill from WoJiSama/skill-based-architecture. This skill should be used when the user asks to "organize the project rules", "clean up scattered documentation", "把规则迁移到 skills 目录", "优化 skill 路由", "提高 description 命中率", or "减少薄壳重复维护". Activate when a SKILL.md is too large, rules are duplicated across agent entry files, task routing or triggerexamples miss natural user language, or templates / thin shells / validation scripts need drift-resistant maintenance.

Its SKILL.md is about 3.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 228 other files, including scripts, reference files and assets (for example `.claude-plugin/marketplace.json`, `.claude-plugin/plugin.json` and `.claude/settings.json`).

It sits in Agent Workflows, covering Agent instruction files. The repository describes itself as: A meta-skill that produces skills. Point it at any codebase and it distills the project's rules, workflows, and hard-won lessons into a dedicated skills/<name/ directory — a… The licence is MIT.

When your agent uses it

  • Asks to organize the project rules
  • Clean up scattered documentation
  • 把规则迁移到 skills 目录
  • 提高 description 命中率

Example prompts

  • “organize the project rules”
  • “clean up scattered documentation”
  • “把规则迁移到 skills 目录”
  • “/skill-based-architecture”

Workflow steps

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

  1. Single concise entry — SKILL.md keeps a dual budget: description ≤ 25 lines (trigger phrases + activation) + body ≤ 90 lines (navigation)…
  2. One skill folder when a folder is admitted — folder-light and broad results keep formal docs under skills//; a direct result may remain a…
  3. Rules ≠ Flows — rules/ for constraints, workflows/ for procedures. ✓ Check: any numbered steps in rules/, or "always/never" in workflows/…
  4. Routing.yaml as source when admitted — a direct carrier owns its sole route in SKILL.md; multiple/shared routes live only in routing.yaml…
  5. Harness surfaces follow readers — create/merge only entries and registrations supported by existing files/config, the current harness…
  6. Progressive Rigor — three carriers (Single-file / Folder-light / Full) grow only under pressure and are not user package choices. ✓ Check…
  7. Description = coarse activation — domain boundary + real user trigger phrases; never enumerate workflow keywords nor summarize a…
  8. Gotchas are highest-value — maintain costly pitfalls actively; keep them discoverable. ✓ Check: is each high-cost gotcha activated by the…
  9. Progressive disclosure — every loaded file needs an independent task-time reason; conditional content leaves the startup read set; files…
  10. Task Execution + Closure — only one clear read-only or fixed-contract maintenance action with no new desired behavior executes directly…
  11. Durable-record rule — generic records generalize across projects; business global models stay project-specific but must survive…
  12. Self-maintenance — line counts signal evaluation, not automatic action; split only for independently selected tasks; merge files…

What it can do on your machine

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

    Ships 1 file in scripts/, which the agent can run.

    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

Skill Based Architecture loads about 3.2k tokens when it runs, and up to ~61k if it reads all its reference files. Until then it costs about 110 tokens; SKILL.md has 1,489 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~110
When it runs · the whole SKILL.md, loaded when a task matches
~3.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~61k

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); the scripts in this folder are not scanned.

SKILL.md

The full file from WoJiSama/skill-based-architecture at commit e5d2da5, republished under its MIT licence (© WoJiSama). 1,489 words, ~3,243 tokens.

Download SKILL.mdSave it as .claude/skills/skill-based-architecture/SKILL.md (or your agent's skills folder). This skill also uses 223 other files; get the full folder from GitHub.
name
skill-based-architecture
description
This skill should be used when the user asks to "organize the project rules", "clean up scattered documentation", "把规则迁移到 skills 目录", "优化 skill 路由", "提高 description 命中率", or "减少薄壳重复维护". Activate when a SKILL.md is too large, rules are duplicated across agent entry files, task routing or trigger_examples miss natural user language, or templates / thin shells / validation scripts need drift-resistant maintenance.

Skill-Based Architecture

Restructure oversized single-file Skills or scattered project rules into a well-organized Skill directory. Builds on the official minimal Agent Skill contract (name + description) and kicks in when a single small SKILL.md is no longer enough.

When to Use

  • A single SKILL.md exceeds ~150 lines, mixing rules, workflows, and background material; or project rules are scattered across AGENTS.md, CLAUDE.md, CODEX.md, .cursor/rules/, .claude/, etc.
  • Recurring tasks need procedures, fitted verification, or reliable completion checks; or the user explicitly requests Skill-based architecture or rule consolidation.
  • Skip temporary repos with no durable routing need, teams with a working compact instruction system, and small projects; an explicit SBA request may still materialize a complete direct SKILL.md carrier.

Progressive Rigor

Grow only under pressure. The materializer derives Single-file, Folder-light, or Full/broad internally from target evidence; users do not select a tier, profile, capability pack, or install mode. routing.yaml, Task Execution, Task Closure, maintenance checks, and each harness surface need their own routing/loading/ownership pressure. Split by abstraction (骨架/肉) when content tangles invariant design theory with current-code facts: abstract theory → architecture/, code maps → references/, house style → conventions/, per-module landmines → gotchas/ (methodology stays in rules/). Downgrade when content shrinks. Details: references/progressive-rigor.md.

Evidence-Selected Structure

text
# direct
skills/<name>/SKILL.md
# folder-light or broad: only admitted owners/directories
skills/<name>/{SKILL.md,rules/,workflows/,references/,scripts/}

routing.yaml appears only when route data has an independent owner; root/tool entry and registration surfaces appear only for proven readers. Existing root entries are preserved. Emitted routed entries use a generated routing.yaml bootstrap; direct entries point to the sole SKILL.md procedure. Cursor registration exists only when Cursor is detected, declared, currently used, or explicitly requested. See REFERENCE.md for sources.

Core Principles

  1. Single concise entry — SKILL.md keeps a dual budget: description ≤ 25 lines (trigger phrases + activation) + body ≤ 90 lines (navigation); it navigates, not exhausts. ✓ Check: smoke-test reports both separately; over either → split intent clusters / move detail to sub-files.
  2. One skill folder when a folder is admitted — folder-light and broad results keep formal docs under skills/<name>/; a direct result may remain a complete single SKILL.md carrier. ✓ Check: no emitted root entry becomes a second rule/workflow owner.
  3. Rules ≠ Flows — rules/ for constraints, workflows/ for procedures. ✓ Check: any numbered steps in rules/, or "always/never" in workflows/, = mixing.
  4. Routing.yaml as source when admitted — a direct carrier owns its sole route in SKILL.md; multiple/shared routes live only in routing.yaml, with routed shells generated from it. ✓ Check: is there an independent selector or consumer that justifies the manifest, and does its fitted sync check pass?
  5. Harness surfaces follow readers — create/merge only entries and registrations supported by existing files/config, the current harness, repository/team declaration, or an explicit request. ✓ Check: can every emitted surface name its reader, and was every existing entry preserved?
  6. Progressive Rigor — three carriers (Single-file / Folder-light / Full) grow only under pressure and are not user package choices. ✓ Check: can you name the independent responsibility that forced every generated file?
  7. Description = coarse activation — domain boundary + real user trigger phrases; never enumerate workflow keywords nor summarize a workflow's steps. ✓ Check: can routing.yaml task routes change without rewriting the description, and does no description/label carry HOW an agent could act on without opening the body?
  8. Gotchas are highest-value — maintain costly pitfalls actively; keep them discoverable. ✓ Check: is each high-cost gotcha activated by the admitted route owner (SKILL.md or routing.yaml), not only buried in references/?
  9. Progressive disclosure — every loaded file needs an independent task-time reason; conditional content leaves the startup read set; files every real caller co-loads should merge unless ownership/generation requires separate storage. ✓ Check: for each route read, can you name a request that needs it now and a next action it changes? No → conditionally route, merge, or remove.
  10. Task Execution + Closure — only one clear read-only or fixed-contract maintenance action with no new desired behavior executes directly; anything that adds or changes user-visible behavior, a business flow/state, or an external contract follows requirement-ready -> Task Anchor -> implementation-ready -> Native Plan -> mutation; Present alignment proportionally and run a compact Anchor Checkpoint before each main step. Workflow is the domain procedure; Native Plan is only this Session's runtime step owner, with no planning-file persistence. Full protocol: references/protocols.md § Task Execution Protocol.
  11. Durable-record rule — generic records generalize across projects; business global models stay project-specific but must survive implementation replacement. ✓ Check: use the destination's test—cross-project pattern or cross-implementation business truth—without mixing code details into either (ref).
  12. Self-maintenance — line counts signal evaluation, not automatic action; split only for independently selected tasks; merge files universally co-loaded/co-changed unless ownership or generation explains the boundary. ✓ Check: can the before/after load matrix prove less irrelevant reading without losing definitions, conditions, boundaries, or reasons?
  13. Activation over storage — content in references/ alone is not "captured"; it must be on the task path and change what the agent does when read; reached-but-inert (correct, on-route, yet the agent would have proceeded identically) is a distinct failure no structural gate can see, only judgment can. ✓ Check: trace the normal route — does hitting the entry change the next action (a file read, a check run, a step skipped)?
  14. Token efficiency — Always Read defaults to empty; every addition needs proof that all real tasks require it before workflow selection; domain and lifecycle knowledge loads only when evidence or a phase boundary can change the next action. ✓ Check: can any startup read be delayed without changing the first workflow decision? If yes, move it to that workflow checkpoint.
  15. Rationalizations Table — captures verbatim excuses from real pressure-test failures only. ✓ Check: every row traces to a real failure — no failure observed and unwilling to baseline it → imagined-pain, drop it (ref, Phase 9).
  16. Response discipline — output short, precise, direct answers; avoid process narration, self-congratulation, gratuitous confirmations, and requirement restatement. ✓ Check: does each sentence serve the explicit request? No → delete it.
  17. Proof claims stay separated — fitted structural checks, source-disposition migration evidence, and live Agent behavior prove different things; green structure cannot be promoted into semantic or behavioral correctness. ✓ Check: does the final claim name the exact layer actually run, and report unavailable live evidence as no verdict?
Show full SKILL.md (502 more words)Show less

Common Pitfalls

  1. Missing admitted harness surface — a project proves a Cursor/Claude/etc. reader but its fitted registration/entry is absent → that harness never discovers the formal owner; the opposite error (emitting every harness without evidence) imposes permanent maintenance cost.
  2. Wrong routing carrier — a routed shell says only "go read SKILL.md" without the generated routing.yaml bootstrap, or a direct project gains an empty manifest merely for uniformity → either recovery breaks or false machinery appears.
  3. Vague / wrong-scope description — passive, wrong-language, too narrow ("fix bug" only), or bloated with every workflow keyword → misses natural requests or over-fires; keep it domain-level and route tasks in SKILL.md.
  4. Stored but not activated — or activated but inert — a costly pitfall recorded in references/ but not surfaced in an owning workflow checkpoint, or on-route yet written as a background fact, never changes the agent's next action; reachable ≠ useful.
  5. Completion responsibility lost during materialization — the agent considers itself done after main work although the admitted workflow/Closure owner requires fitted verification or AAR; a simple workflow may own that inline; pure Q&A/read-only tasks remain exempt.
  6. Project-specific records — lessons written as project narratives ("in our product module, we found…") are useless outside current context; apply the generalization rule before recording.
  7. No SessionStart hook on long sessions — /clear or /compact silently drops SKILL.md from context without the user noticing → install a SessionStart hook if your harness supports it (references/thin-shells.md § SessionStart Hook).
  8. Route skipping in multi-task sessions — the agent reuses the last task's route for a new task and works from stale memory, missing critical rules → re-match the route every task (tiered Session Discipline; all shells carry the trigger).
  9. Missing or performative Task Anchor / long-task drift — the agent starts a non-Simple task without a stable Goal/Done When or dumps a labeled block duplicating the native Plan → use templates/skill/workflows/task-execution.md; keep the Anchor as runtime state and run reboot-check.md before final validation/commit.
  10. Imagined-pain engineering — before adding any mechanism (rule/script/file/template section), give a concrete scenario (file+line / commit / session) proving it really happened; none → don't add it. Historic: 5 ghost scripts (cut 2026-05-19), dossier schema (cut 2026-05-19), reflection-first mode shift (dropped 2026-05-20), observations log (rejected 2026-05-20).

Content Classification

Content type — tier by abstraction: 骨架 (architecture/workflows/rules = invariant theory) vs 肉 (conventions/gotchas/references = current-code facts) · split playbookTargetKind
Abstract design theory — layering/contract/orchestration/transaction principles, the "why" (NOT the module map)architecture/骨架
Code maps + background — module tree, dir layout, source index, build/env notesreferences/肉
House style — naming, paths, commands, formats, must/never conventionsconventions/肉
Code-coupled landmines (symptom → cause → fix), split only by independently routed modulegotchas/ (selecting gotchas/index.md only after multi-file pressure)肉
Step-by-step task procedures (process theory)workflows/骨架
Prompts/reports/docs · editor config (thin shells)docs/ · .cursor/ .claude/—

Multi-Skill & Composition

Multi-skill repos — see references/multi-skill-routing.md (operating + fission + coexistence). For invoking other skills from your workflows (embedded / serial / subagent delegation), see references/skill-composition.md + starter templates/skill/workflows/invoke-skill.md.example.

Resources

© WoJiSama, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 223 other files (scripts, references, assets) in the repository root of WoJiSama/skill-based-architecture.

  • SKILL.md
  • .claude-plugin/marketplace.json
  • .claude-plugin/plugin.json
  • .claude/hooks/session-start
  • .claude/settings.json
  • .cursor/rules/workflow.mdc
  • .cursor/skills
  • .gitignore
  • .maintenance-log.yaml
  • AGENTS.md
  • CLAUDE.md
  • CODEX.md
  • EXAMPLES.md
  • GEMINI.md
  • LICENSE
  • README.md
  • … and 208 more

Open the folder on GitHubat commit e5d2da5

Compare with similar skills

Skill Based Architecture 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.

Skill Based Architecture compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Skill Based Architecture this skillWoJiSama/skill-based-architecture607—~3.2kAutomated safety check: PassMIT
Using Agent Skillsaddyosmani/agent-skills103k4 repos~2.4kAutomated safety check: PassMIT
Claude ReflectBayramAnnakov/claude-reflect1.7k2 repos~627Automated safety check: PassMIT
Neat-Freak Knowledge CloseoutKKKKhazix/khazix-skills21k—~1.9kAutomated safety check: PassMIT
Writing For Agentsbestofjs/bestofjs3.1k18 repos~2.7kAutomated safety check: PassMIT
Task Observerrebelytics/one-skill-to-rule-them-all3.2k1 repos~12kAutomated safety check: PassCC-BY-4.0

Similar skills

  • Using Agent Skills

    addyosmani/agent-skills

    Meta-skill for choosing which workflow skill fits the task at hand, plus always-on habits: surface assumptions, stop on confusion, push back, keep it simple and stay in scope.

    103k GitHub starsUsed in 4 repos~2.4k tokens
    Agent WorkflowsAuto-check passed
  • Claude Reflect

    BayramAnnakov/claude-reflect

    Self-learning system that captures corrections during sessions and reminds users to run /reflect to update CLAUDE.md.

    1.7k GitHub starsUsed in 2 repos~627 tokens
    Agent WorkflowsAuto-check passed
  • Neat-Freak Knowledge Closeout

    KKKKhazix/khazix-skills

    Brings project docs, agent rule files, authorized memory and leftover workspace files back in line with what the code and runtime actually do at the end of a work session.

    21k GitHub stars~1.9k tokensUpdated 7 days ago
    Agent WorkflowsAuto-check passed
  • Writing For Agents

    bestofjs/bestofjs

    Writing documents for agents. An agent skill from bestofjs/bestofjs.

    3.1k GitHub starsUsed in 18 repos~2.7k tokens
    Agent WorkflowsAuto-check passed
  • Task Observer

    rebelytics/one-skill-to-rule-them-all

    Monitors task execution for skill improvement opportunities.

    3.2k GitHub starsUsed in 1 repo~12k tokens
    Agent WorkflowsAuto-check passed
  • SkillOpt Sleep Cycle

    microsoft/SkillOpt

    Official

    Runs an on-demand or nightly sleep cycle that reviews past Claude Code sessions and proposes validated updates to CLAUDE.md and skills.

    18k GitHub stars~2.3k tokensUpdated 2 days ago
    Agent WorkflowsAuto-check passed

Categories

Questions about Skill Based Architecture

What does Skill Based Architecture do?

This skill should be used when the user asks to "organize the project rules", "clean up scattered documentation", "把规则迁移到 skills 目录", "优化 skill 路由", "提高 description 命中率", or "减少薄壳重复维护". Skill Based Architecture is an agent skill from WoJiSama/skill-based-architecture. This skill should be used when the user asks to "organize the project rules", "clean up scattered documentation", "把规则迁移到 skills 目录", "优化 skill 路由", "提高 description 命中率", or "减少薄壳重复维护".

When should I use Skill Based Architecture?

Skill Based Architecture fits situations like: asks to organize the project rules; clean up scattered documentation; 把规则迁移到 skills 目录; 提高 description 命中率.

How do I install Skill Based Architecture in Claude Code?

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

How do I install Skill Based Architecture in Codex?

Run `npx skills add WoJiSama/skill-based-architecture --skill skill-based-architecture -a codex`. Or copy the skill folder (the WoJiSama/skill-based-architecture repository) into .agents/skills/skill-based-architecture in your project. Codex loads it when a task matches its description.

Can I use Skill Based Architecture 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 WoJiSama/skill-based-architecture --skill skill-based-architecture -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/skill-based-architecture, .gemini/skills/skill-based-architecture, .github/skills/skill-based-architecture and .opencode/skills/skill-based-architecture in your project.

What does Skill Based Architecture need to run?

SKILL.md names no scripts, command-line tools or credentials: Skill Based Architecture is instructions for the agent only.

Does Skill Based Architecture 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 Skill Based Architecture 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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Skill Based Architecture use?

Skill Based Architecture is published under the MIT licence (from the LICENSE file in the skill folder). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Skill Based Architecture use?

About 3.2k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 57k tokens, read only when the agent opens those files.

What are the alternatives to Skill Based Architecture?

Skills that share tags, products or a category with Skill Based Architecture: Using Agent Skills (addyosmani/agent-skills, 103k stars), Claude Reflect (BayramAnnakov/claude-reflect, 1.7k stars), Neat-Freak Knowledge Closeout (KKKKhazix/khazix-skills, 21k stars) and Writing For Agents (bestofjs/bestofjs, 3.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Skill Based Architecture?

WoJiSama (a GitHub user) maintains it in WoJiSama/skill-based-architecture, which has 607 GitHub stars. The repository was last updated on September 20, 2026.

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