PyModel/pythinker-code / packages/agent-core-v2/src/features/skill/catalog/builtin/sub-skill/consolidate
consolidate
VerifiedApply an approved sub-skill grouping by moving user-specified skills into a parent bundle, with timestamped backups of every modified directory.
Consolidate sub-skills (sub-skill.consolidate)
Execute the reorganization by moving user-specified skills into a parent bundle, forming a sub-skill hierarchy.
When to use
- The user has approved a grouping proposal (typically from
sub-skill.review) and wants to apply it. - Migrating standalone skills into a new or existing parent bundle.
Process
- Confirm the plan. Restate which skills will move and where, and ask the user to confirm before making any file changes.
- Back up every original skill directory. Before moving anything, create a timestamped backup of each skill directory that will be modified.
- For a skill at
<root>/<skill-name>/SKILL.md, back up the entire<skill-name>directory:cp -r <skill-name> "<skill-name>.$(date +%Y%m%d-%H%M%S).bak" - Keep all backups; never overwrite an existing backup file.
- For a skill at
- Create or update the parent bundle.
- If the parent does not exist, create
<parent-name>/SKILL.mdwithhas-sub-skill: truein the frontmatter. - If the parent already exists, ensure its frontmatter includes
has-sub-skill: true.
- If the parent does not exist, create
- Move child skills into the parent. Move each child skill's entire directory under the parent bundle.
- Example:
web-search/→web-research/web-search/
- Example:
- Keep documentation directory alignment. When moving documentation, references, examples, assets, or other payload directories, align them with the new skill directory layout.
- Preserve relative links from
SKILL.mdto files such asreferences/,assets/,examples/, or templates. - If a child skill moves from
<root>/<child>/to<root>/<parent>/<child>/, its documentation payload should move with that child unless the approved plan says otherwise. - Do not leave documentation in the old location or merge unrelated documentation directories together.
- Preserve relative links from
- Verify the result. List the new directory structure and confirm each moved skill still has a valid
SKILL.mdwith required frontmatter (nameanddescription). Check documentation directory alignment and relative links after the move. - Report the change. Summarize what was moved, the new structure, any documentation directories that moved, and where backups are located.
Don'ts
- Never move skills without backing up first.
- Never overwrite an existing backup — always use a fresh timestamped suffix.
- Don't drop frontmatter or payload files during the move; the entire directory must be preserved.
- Don't break documentation directory alignment — references, assets, examples, and templates must stay aligned with the skill directory that uses them.
- Don't create deeply nested hierarchies (3+ levels) unless the user explicitly requests it.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 465k | Updated | Claude CodeCodex | Verified | Install |
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 465k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |