Doramagic Project Pack · Human Manual
s4b7-ai-skills
Related topics: Installation Guide, Skill Structure & Anatomy
Home - Repository Overview
Related topics: Installation Guide, Skill Structure & Anatomy
Continue reading this section for the full explanation and source context.
Related Pages
Related topics: Installation Guide, Skill Structure & Anatomy
Home - Repository Overview
Introduction
The s4b7-ai/s4b7-ai-skills repository is a skills library designed to extend and automate AI agent capabilities across multiple domains. This repository serves as a central hub for specialized operational skills that enable AI systems (such as Codex, Claude, Gemini, and custom shadow agents) to perform complex tasks including memory management, code refactoring, patent processing, multi-model querying, and engineering intelligence.
The skills are structured as reusable, modular units that can be loaded by AI agents on demand based on contextual triggers. Each skill encapsulates domain-specific workflows, CLI commands, API integrations, and operational patterns.
Sources: skills/write-a-skill/SKILL.md
Sources: skills/write-a-skill/SKILL.md
Installation Guide
Related topics: Home - Repository Overview, Skill Dependencies & Metadata
Continue reading this section for the full explanation and source context.
Continue reading this section for the full explanation and source context.
Continue reading this section for the full explanation and source context.
Continue reading this section for the full explanation and source context.
Related Pages
Related topics: Home - Repository Overview, Skill Dependencies & Metadata
Installation Guide
Overview
This repository (s4b7-ai-skills) is a collection of AI agent skills designed to extend the capabilities of various AI systems including Codex, Claude, Gemini, and local models via Ollama. Each skill is a self-contained module that provides specific functionality, from code refactoring to patent generation.
The installation process involves setting up the skill framework, configuring skill dependencies, and verifying that skills are properly registered and accessible to your AI agents. Skills are defined using YAML frontmatter in SKILL.md files with accompanying scripts and references.
Prerequisites
System Requirements
| Component | Minimum | Recommended |
|---|---|---|
| Node.js | 18.x | 20.x+ |
| npm | 8.x | 10.x+ |
| Git | 2.x | Latest |
| Disk Space | 100MB | 500MB |
Required Tools
Before installing skills, ensure the following tools are available:
- Git — Required for cloning repositories and version control operations Sources: skills/shadow-refactor/SKILL.md:25
- pytest/vitest/jest — Test runners for verifying skill functionality Sources: skills/shadow-refactor/SKILL.md:26
- curl — For checking local model availability (Ollama) Sources: skills/shadow-refactor/SKILL.md:23
External Services (Optional)
| Service | Purpose | Configuration |
|---|---|---|
| Ollama | Local LLM inference | http://localhost:11434 |
| Tailscale | Mesh networking | Mesh nodes required |
| MCP Servers | Tool integrations | Per-skill configuration |
Installation Steps
Step 1: Clone the Repository
git clone https://github.com/s4b7-ai/s4b7-ai-skills.git
cd s4b7-ai-skills
Step 2: Install Dependencies
Run the installation script to set up the skill framework:
npm install
This will install all required npm dependencies and prepare the skill infrastructure for use. The package.json defines the project dependencies and scripts available for skill management.
Step 3: Configure Skill Paths
Skills are organized in a directory structure that AI agents traverse when loading capabilities. The default skill locations are:
| Location Type | Path | Purpose |
|---|---|---|
| First-party | /Volumes/☯Duality/skills/ | Primary skill collection |
| Vendor | /Volumes/☯Duality/.agents/skills/ | Vendor-provided skills |
| User | /Volumes/☯Duality/.pi/skills/ | Personal skill customizations |
| Project-level | .agents/skills/ | Project-specific skills |
Ensure your AI agent's configuration points to one or more of these directories. For Codex integration, configure ~/.codex/config.toml with the appropriate skill paths.
Step 4: Verify Portability
Check that all skill symlinks and references are valid:
npm run verify:portable
This command validates that skills can be loaded correctly from their configured paths.
Skill Structure
Each skill follows a standardized structure:
skill-name/
├── SKILL.md # Main skill definition with YAML frontmatter
├── REFERENCE.md # Detailed reference documentation (optional)
├── scripts/ # Utility scripts (optional)
│ └── helper.js
└── tests/ # Test files (optional)
└── skill.test.js
SKILL.md Format
Every skill requires a SKILL.md file with this frontmatter structure:
Source: https://github.com/s4b7-ai/s4b7-ai-skills / Human Manual
Skill Structure & Anatomy
Related topics: Home - Repository Overview, Write A Skill - Authoring Guide, Skill Dependencies & Metadata
Continue reading this section for the full explanation and source context.
Continue reading this section for the full explanation and source context.
Related Pages
Related topics: Home - Repository Overview, Write A Skill - Authoring Guide, Skill Dependencies & Metadata
Skill Structure & Anatomy
Overview
A Skill is a reusable capability module that encapsulates domain-specific knowledge, workflows, and decision-making patterns for an AI agent. Skills enable agents to perform specialized tasks by providing structured guidance on when and how to apply particular capabilities.
Skills serve as the atomic unit of agentic capability—each skill contains sufficient information for an agent to recognize when it should be invoked and how to execute the associated workflow. The skill system supports a modular architecture where skills can be composed, extended, and shared across different agent contexts.
Core Anatomy of a Skill
Every skill is fundamentally defined by its metadata and operational content. The minimal viable skill consists of YAML frontmatter and a Markdown body that describes the capability.
YAML Frontmatter
The frontmatter uses a standardized schema to ensure parsers and agents can reliably extract skill metadata:
Source: https://github.com/s4b7-ai/s4b7-ai-skills / Human Manual
Skill Dependencies & Metadata
Related topics: Skill Structure & Anatomy, Crystallize - Pattern Extraction
Continue reading this section for the full explanation and source context.
Continue reading this section for the full explanation and source context.
Continue reading this section for the full explanation and source context.
Continue reading this section for the full explanation and source context.
Related Pages
Related topics: Skill Structure & Anatomy, Crystallize - Pattern Extraction
Skill Dependencies & Metadata
Overview
The s4b7-ai-skills repository implements a structured approach to skill documentation that encompasses metadata standards, dependency management, and artifact routing. Each skill follows a consistent SKILL.md template that defines its purpose, trigger conditions, workflows, and integration points with other system components.
The metadata system serves three core purposes: enabling agent-based skill selection through descriptive frontmatter, establishing clear execution workflows with fallback chains, and routing artifacts to appropriate storage locations for persistence and retrieval.
Skill Metadata Structure
Frontmatter Schema
Every skill in the repository begins with YAML frontmatter that defines its identity and selection criteria. The required metadata fields ensure proper agent routing and discovery.
| Field | Purpose | Constraints |
|---|---|---|
name | Skill identifier | Unique within skill namespace |
description | Capability summary for agent selection | Max 1024 chars, third person, must include "Use when..." clause |
triggers | Keywords and contexts that activate the skill | Extracted from description for matching |
Sources: skills/write-a-skill/SKILL.md:1-20
Description Requirements
The description field is the primary mechanism by which agents decide which skill to load. It must follow a strict two-sentence format:
- First sentence: States what the skill does
- Second sentence: Contains the "Use when..." clause specifying trigger conditions
Example of a well-formed description:
Extract text and tables from PDF files, fill forms, merge documents. Use when working with PDF files or when user mentions PDFs, forms, or document extraction.
Sources: skills/write-a-skill/SKILL.md:52-56
The description is surfaced in the system prompt alongside all other installed skills, allowing the agent to pick the relevant skill based on the user's request. This makes the description the single most important metadata element for skill discoverability.
Skill Kinds and Tags
The qmd-memory skill implements a tagging system for memory classification that can be applied to skill metadata:
| Kind | Usage |
|---|---|
fact | Permanent factual information |
commitment | Promises or obligations |
decision | Choices made during execution |
preference | User or system preferences |
context | Session-specific context |
Tags provide additional dimension to skill metadata, enabling filtering and targeted recall.
Sources: skills/qmd-memory/SKILL.md:45-52
Skill Modes and Command Routing
Mode Architecture
Skills expose multiple operational modes that define different execution paths. The mode system allows a single skill to handle diverse use cases through command-based routing.
graph TD
A[User Input] --> B{Mode Detection}
B -->|default| C[Standard Execution]
B -->|verbose| D[Detailed Diagnostics]
B -->|json| E[Machine Output]
B -->|background| F[Autonomous Loop]
C --> G[Primary Handler]
D --> H[Debug Handler]
E --> I[Parse Handler]
F --> J[Background Agent]
G --> K[Result Output]
H --> K
I --> K
J --> KSources: skills/codex-latex/SKILL.md:35-48
Mode Reference by Skill
| Skill | Modes | Purpose |
|---|---|---|
ai-sdk-core | migrate, agent, error, workers, verify | AI SDK v5/v6 lifecycle management |
shadow-engg | explore, engineering | Competitive intelligence and gap analysis |
shadow-refactor | background, patterns, hotspot, equilibrium | Code refactoring and pattern extraction |
shadow-mcp-gadgets | memory, context, mesh, browser, ambient, voice, environment, patent, test | MCP tool delegation |
Sources: skills/shadow-engg/SKILL.md:1-30, skills/shadow-refactor/SKILL.md:1-15, skills/shadow-mcp-gadgets/SKILL.md:1-20
Artifact Routing System
Artifact Types
Artifacts are outputs produced during skill execution that require persistent storage. Each skill defines a routing table specifying where artifacts should be stored.
| Artifact Type | Path Pattern | Purpose |
|---|---|---|
| Tool signals | tools/integrate/tool-signals.jsonl | Per-fix results in JSONL format |
| Refactor reports | ShadowArchive/80-reports/refactor-<target>-YYYY-MM-DD.md | Session summaries |
| Memory stores | ARC memory store | Persistent agent memory |
| Patent drafts | docs/patents/SP-NNN/ | Specification and claims |
Sources: skills/shadow-refactor/SKILL.md:15-22, skills/shadow-mcp-gadgets/SKILL.md:22-28
Artifact Routing Table Format
Skills implement artifact routing through structured tables in SKILL.md:
| Artifact | Location | Purpose |
|----------|----------|---------|
| Code changes | Project files (inline) | Implementation output |
| Detailed reference | `REFERENCE.md` (skill companion) | Migrations, errors, model notes |
| Original backup | `data/skill-rd/active-split-backups/` | Pre-split archive |
Sources: skills/ai-sdk-core/SKILL.md:28-33
Fallback Chain Architecture
Fallback Principles
Every skill implements a fallback chain that defines recovery behavior when primary execution paths fail. The chain prioritizes available alternatives in order of preference.
graph LR
A[Primary] --> B[Secondary]
B --> C[Tertiary]
C --> D[Last Resort]
style A fill:#90EE90
style B fill:#FFE4B5
style C fill:#FFA07A
style D fill:#FF6B6BFallback Chain Examples
ai-sdk-core Fallback Chain:
| Priority | Source | Condition |
|---|---|---|
| 1 | REFERENCE.md | Detailed reference available |
| 2 | Web search / docs | REFERENCE.md stale or missing |
| 3 | npm view ai versions | Version uncertainty |
| 4 | Stable v5 default | All else fails |
Sources: skills/ai-sdk-core/SKILL.md:35-42
shadow-engg Fallback Chain:
| Priority | Mode | Condition |
|---|---|---|
| 1 | Full scan | ShadowArchive mounted, skills accessible |
| 2 | Local-only | Archive unmounted |
| 3 | Skip mesh health | Tailscale mesh unreachable |
| 4 | Report API status | Caresoft API unavailable |
Sources: skills/shadow-engg/SKILL.md:55-68
skill-surgery-rd Error Handling:
| Failure | Recovery |
|---|---|
| Script execution fails | Manual find + grep inventory |
| Malformed YAML frontmatter | Flag; propose manual repair |
| Circular redirect detected | Block; require manual resolution |
| Too many skills (>500) | Prioritize active; sample archived |
Sources: skills/skill-surgery-rd/SKILL.md:45-55
Skill Dependencies and Interconnections
Crystallization Workflow
The crystallization process creates dependencies between skills by extracting patterns from working sessions into reusable skill definitions.
graph TD
A[Task Complete] --> B{Should this recur?}
B -->|yes| C[Review Session]
B -->|no| D[Done]
C --> E[Extract Pattern]
E --> F[Check Scope]
F --> G{Search Existing Skills}
G -->|overlap found| H[Update Existing]
G -->|no overlap| I[Create New Skill]
H --> J[Log Crystallization]
I --> JSources: skills/crystallize/SKILL.md:55-78
Exploratory-Mode Expansion
When operators request expanded crystallization, the skill performs a broader sweep:
- Start from the exact thing that was fixed
- Check nearest adjacent surfaces that could carry the same stale assumption
- Capture the broader reusable rule
Sources: skills/crystallize/SKILL.md:75-85
Skill Surgery and Dependencies
The skill-surgery-rd skill manages skill dependencies through audit and repair operations. Key operations include:
- Audit: Scan skill directories for stale metadata, circular dependencies, or missing trigger conditions
- Merge: Combine overlapping skills while preserving gotchas from both sources
- Redirect: Route deprecated skill triggers to canonical replacements
Sources: skills/skill-surgery-rd/SKILL.md:1-45
File Reference System
Global File Registry
The codex-context skill maintains a master file reference table for system-wide file access:
| File | Purpose | Location |
|---|---|---|
| Codex config | Model, sandbox, MCP, plugins | ~/.codex/config.toml |
| Codex memories | Persistent memory across sessions | ~/.codex/memories/MEMORY.md |
| Codex rules | Caveman mode rules | ~/.codex/rules/*.md |
| Codex prompts | Will, swarm, review, skill-up | ~/.codex/prompts/*.md |
| Hermes SOUL.md | Shadow persona (default) | ~/.hermes/SOUL.md |
| Gemini GEMINI.md | YOLO mode + global rules | ~/.gemini/GEMINI.md |
Sources: skills/codex-context/SKILL.md:85-98
Key Path Resolution
| Path Type | Location |
|---|---|
| ShadowArchive | /Volumes/☯Duality/ShadowArchive/ |
| Reports | ShadowArchive/80-reports/ |
| Agent roots | ShadowArchive/03-agent-roots/ |
| Registry | ShadowArchive/01-registry/ |
| First-party skills | /Volumes/☯Duality/skills/ |
| Vendor skills | /Volumes/☯Duality/.agents/skills/ |
Sources: skills/codex-context/SKILL.md:35-48
Contract and Constraints
Skill Contracts
Each skill defines a contract specifying operational boundaries:
| Contract Element | Description |
|---|---|
| Context persistence | Do not persist without operator request |
| Zone boundaries | Enterprise context does not leak into personal zone |
| Recall confidence | Always label confidence level |
| Memory writes | Append-only, never destructive |
Sources: skills/shadow-mind/SKILL.md:75-85
Operational Rules
skill-surgery-rd Contract:
- Do not delete skills during exploratory surgery — redirect first
- Do not edit archived history unless surfacing as active trigger problem
- Do not create giant omnibus skills — prefer canonical router plus focused subskills
- Research before invention — never crystallize stale version numbers without freshness note
Sources: skills/skill-surgery-rd/SKILL.md:57-70
shadow-engg Contract:
- Never modify production config without operator confirmation
- Report all changes with before/after diff
- Preserve existing configurations with backup
Sources: skills/shadow-engg/SKILL.md:125-130
Integration with MCP Gadgets
Gadget Mode Routing
The shadow-mcp-gadgets skill routes commands to specialized tools based on trigger phrases:
| Mode | Gadget | Triggers |
|---|---|---|
memory | ARC | arc.store, arc.search, memory triggers |
context | ESP | esp.assemble, /renew-ctx |
mesh | ANT | ant.mesh, mesh health |
browser | TAP | tap.tabs, tap.execute |
ambient | OWL | owl.brief, owl.extract |
voice | ORB | orb.say, orb.voices |
environment | DEN | den.environment |
patent | Factory | factory.new, factory.draft |
Sources: skills/shadow-mcp-gadgets/SKILL.md:8-18
Recall Scoring System
The shadow-mind skill implements confidence-based recall for skill metadata:
| Confidence Level | Meaning | Source |
|---|---|---|
| Confirmed | Found in durable artifact (anchor, kernel, Dropbox) | File match |
| Likely | Found in training pairs or distilled experience | Pattern match |
| Inferred | Reconstructed from context but no explicit artifact | Reasoning |
| Unknown | No evidence found | No match |
Always label recall confidence. Never present inferred as confirmed.
Sources: skills/shadow-mind/SKILL.md:55-65
Review Checklist
After drafting or updating skill metadata, verify:
- [ ] Description includes "Use when..." trigger clause
- [ ] SKILL.md under 100 lines (split if exceeded)
- [ ] No time-sensitive info that will become stale
- [ ] Consistent terminology with adjacent skills
- [ ] Concrete examples included
- [ ] References one level deep only
Sources: skills/write-a-skill/SKILL.md:95-102
Sources: skills/write-a-skill/SKILL.md:1-20
LangGraph Agent Development
Related topics: AI SDK Core - Vercel Integration, Agent Crystallization Protocol
Continue reading this section for the full explanation and source context.
Continue reading this section for the full explanation and source context.
Continue reading this section for the full explanation and source context.
Continue reading this section for the full explanation and source context.
Related Pages
Related topics: AI SDK Core - Vercel Integration, Agent Crystallization Protocol
LangGraph Agent Development
Overview
LangGraph Agent Development provides a framework for building stateful, multi-agent applications using LangGraph's graph-based architecture. It enables developers to create agents that maintain context across interactions, coordinate multiple sub-agents, and handle complex workflow orchestration through explicit state management and conditional routing.
LangGraph extends the concept of LLM chains by introducing nodes (agents/tools) and edges (transitions) within a directed graph structure, allowing for more sophisticated agentic behaviors than linear chain implementations.
Core Concepts
Graph Architecture
LangGraph applications are built as stateful graphs composed of nodes and edges:
| Component | Description | Role in Architecture |
|---|---|---|
| State | Shared data structure passed between nodes | Centralized memory model |
| Nodes | Functions representing agents or tools | Execute tasks, modify state |
| Edges | Define transitions between nodes | Control flow logic |
| Conditional Edges | Dynamic routing based on state | Decision-making paths |
State Management
State in LangGraph is typically a TypedDict or Pydantic model that accumulates data as it flows through the graph:
from typing import TypedDict
from typing_extensions import Annotated
import operator
class AgentState(TypedDict):
messages: Annotated[list, operator.add]
context: dict
next_action: str
The Annotated type with operator.add enables message accumulation, where each node appends to the messages list rather than replacing it.
Workflow Patterns
Basic Agent Loop
graph TD
A[User Input] --> B[LLM Decision Node]
B --> C{Should Respond?}
C -->|Yes| D[Return to User]
C -->|No| E{Should Use Tool?}
E -->|Yes| F[Execute Tool]
E -->|No| G[Continue to Next Node]
F --> H[Update State]
H --> B
G --> I[End or Next Agent]
I --> DMulti-Agent Orchestration
For complex tasks, LangGraph enables hierarchical agent architectures:
| Pattern | Use Case | Description |
|---|---|---|
| Supervisor | Single task delegation | One agent routes to specialized sub-agents |
| Hierarchical | Complex workflows | Multiple supervisor levels manage complexity |
| Collaborative | Parallel processing | Agents share context and contribute to solution |
Advanced Patterns
Human-in-the-Loop
Integrating human feedback into agent execution:
def human_review_node(state: AgentState) -> AgentState:
user_input = interrupt("Awaiting human review...")
return {"feedback": user_input}
The interrupt function pauses execution and yields control to external systems (UIs, APIs) for human approval before resuming.
Memory Persistence
LangGraph supports checkpointing for long-running conversations:
from langgraph.checkpoint.sqlite import SqliteSaver
checkpointer = SqliteSaver.from_conn_string(":memory:")
graph = compileprompt | model | parser, checkpointer=checkpointer)
Checkpoints enable:
- Conversation resumption after interruptions
- Branching for exploration
- Audit trails of agent decisions
Tool Integration
Tools are defined as functions and integrated into the graph:
from langchain_core.tools import tool
@tool
def search_codebase(query: str) -> str:
"""Search the codebase for relevant files."""
# Implementation
return results
tools = [search_codebase]
API Reference
Compiling the Graph
from langgraph.graph import StateGraph, END
workflow = StateGraph(AgentState)
workflow.add_node("agent", agent_node)
workflow.add_node("tools", tool_node)
workflow.set_entry_point("agent")
workflow.add_conditional_edges(
"agent",
should_continue,
{
"continue": "agent",
"end": END,
}
)
app = workflow.compile()
Key Parameters
| Parameter | Type | Purpose |
|---|---|---|
checkpointer | BaseCheckpointSaver | Enables state persistence |
interrupts | list | Pause points for external input |
debug | bool | Enable verbose execution logging |
Best Practices
Error Handling
Implement retry logic and fallbacks within nodes:
def robust_agent_node(state: AgentState) -> AgentState:
max_retries = 3
for attempt in range(max_retries):
try:
result = risky_operation(state)
return {"result": result, "status": "success"}
except Exception as e:
if attempt == max_retries - 1:
return {"error": str(e), "status": "failed"}
continue
State Optimization
Minimize state size to improve performance:
- Use references (IDs) instead of full objects where possible
- Implement state pruning at node boundaries
- Separate ephemeral vs. persistent state concerns
Testing Strategies
| Approach | Target | Method |
|---|---|---|
| Unit tests | Individual nodes | Mock state input/output |
| Integration tests | Full graph paths | Use deterministic checkpointer |
| Property-based tests | State transitions | Verify invariants across runs |
Integration with s4b7-ai-skills
The LangGraph Agent Development skill follows the repository's skill template structure:
- Quick Start: Minimal working example for agent initialization
- Workflows: Step-by-step processes with checklists
- Advanced Features: Referenced in companion files for specialized patterns
Sources: skills/write-a-skill/SKILL.md
Related Skills
| Skill | Purpose |
|---|---|
shadow-refactor | Code refactoring patterns for agent implementations |
crystallize | Extract reusable patterns from agent sessions |
ai-sdk-core | V5/V6 migration guidance for AI SDK integration |
Conclusion
LangGraph Agent Development provides the architectural foundation for building sophisticated, stateful agent systems. By modeling agents as nodes in a graph with explicit state management and conditional routing, developers can create predictable, debuggable, and scalable agentic applications that handle complex multi-step workflows effectively.
Sources: skills/write-a-skill/SKILL.md
AI SDK Core - Vercel Integration
Related topics: LangGraph Agent Development
Continue reading this section for the full explanation and source context.
Continue reading this section for the full explanation and source context.
Continue reading this section for the full explanation and source context.
Continue reading this section for the full explanation and source context.
Related Pages
Related topics: LangGraph Agent Development
AI SDK Core - Vercel Integration
Overview
The AI SDK Core skill provides a comprehensive toolkit for building backend AI applications using the Vercel AI SDK. It supports both stable v5 and v6 beta releases, offering capabilities for text generation, streaming, structured output, and agent-based workflows.
This skill targets developers implementing AI-powered backend routes, migrating between SDK versions, troubleshooting runtime errors, or integrating with latest AI models from OpenAI, Anthropic, and Google.
Sources: skills/ai-sdk-core/SKILL.md
Skill Metadata
| Property | Value |
|---|---|
| Name | AI SDK Core |
| Version | 1.2.0 |
| Last Verified | 2025-11-22 |
| Stable SDK Version | 5.0.98 |
| Beta SDK Version | 6.0.0-beta.107 |
| Production Tested | Yes |
| License | MIT |
| Dependencies | ai-fi-manager |
Sources: skills/ai-sdk-core/SKILL.md
Supported Capabilities
Core Functions
| Function | Purpose |
|---|---|
generateText | Non-streaming text generation |
streamText | Streaming text generation with real-time output |
generateObject | Structured output generation with Zod schema validation |
streamObject | Streaming structured object generation |
Advanced Features (v6 Beta)
| Feature | Description |
|---|---|
| Agent Abstraction | Built-in agent class with tool support |
| Tool Approval | Human-in-the-loop approval workflow |
| Reranking Support | Semantic search reranking capabilities |
Sources: skills/ai-sdk-core/SKILL.md
Quick Start Workflow
graph TD
A[Task Request] --> B{Identify Task Type}
B -->|New Route| C[Core Functions]
B -->|Agent/Tool Loop| D[v6 Agent Abstraction]
B -->|Migration| E[Breaking Change Checklist]
B -->|Error Fix| F[Error Cookbook]
C --> G[Install Packages]
D --> G
E --> H[Follow Migration Guide]
F --> I[Apply Recipe]
G --> J[Implement & Test]
H --> J
I --> JInstallation
npm install ai @ai-sdk/openai @ai-sdk/anthropic @ai-sdk/google zod
# Beta lane when explicitly needed:
npm install ai@beta @ai-sdk/openai@beta @ai-sdk/react@beta
Sources: skills/ai-sdk-core/SKILL.md
Task Routing
| Task | Starting Point |
|---|---|
| New backend AI route | Core functions: generateText, streamText, generateObject, streamObject |
| Agent/tool loop | v6 Agent abstraction in REFERENCE.md |
| v4→v5 migration | Breaking-change checklist in REFERENCE.md |
| Cloudflare Worker startup | Lazy-import Workers fix in REFERENCE.md |
| Runtime error | Error cookbook in REFERENCE.md |
| Current model selection | Verify provider docs, then use provider examples in REFERENCE.md |
Sources: skills/ai-sdk-core/SKILL.md
v4 to v5 Breaking Changes
The migration from v4 to v5 introduces several breaking changes that require code updates.
Sources: skills/ai-sdk-core/references/v5-breaking-changes.md
Message Types Renaming
| v4 Type | v5 Type | Purpose |
|---|---|---|
CoreMessage | ModelMessage | Messages for the model |
Message | UIMessage | UI hooks |
convertToCoreMessages | convertToModelMessages | Conversion utility |
Before (v4):
import { CoreMessage, convertToCoreMessages } from 'ai';
const messages: CoreMessage[] = [
{ role: 'user', content: 'Hello' },
];
const converted = convertToCoreMessages(uiMessages);
After (v5):
import { ModelMessage, convertToModelMessages } from 'ai';
const messages: ModelMessage[] = [
{ role: 'user', content: 'Hello' },
];
const converted = convertToModelMessages(uiMessages);
Sources: skills/ai-sdk-core/references/v5-breaking-changes.md
Tool Error Handling
| Aspect | v4 Behavior | v5 Behavior |
|---|---|---|
| Error Type | ToolExecutionError | Regular Error |
| Error Location | Thrown explicitly | Appears as content parts |
| Execution Impact | Stops execution | Continues with error in stream |
Before (v4):
import { ToolExecutionError } from 'ai';
const tools = {
risky: {
execute: async (args) => {
throw new ToolExecutionError({
message: 'API failed',
cause: originalError,
});
},
},
};
After (v5):
const tools = {
risky: tool({
execute: async (input) => {
throw new Error('API failed');
},
}),
};
Sources: skills/ai-sdk-core/references/v5-breaking-changes.md
Error Solutions
The skill includes a cookbook with 12+ error solutions covering common runtime issues.
| Error Category | Count | Coverage |
|---|---|---|
AI_APICallError | 1+ | API communication failures |
AI_NoObjectGeneratedError | 1+ | Structured output failures |
| Stream Text Silent Errors | 1+ | Stream consumption issues |
| Cloudflare Workers Errors | 1+ | Worker-specific problems |
Sources: skills/ai-sdk-core/SKILL.md
Common Decision Points
| Scenario | Recommendation |
|---|---|
| Stable vs Beta | Prefer stable v5 unless v6 beta features explicitly requested |
| Workers startup | Use lazy imports when startup budget matters |
| Stream errors | Treat streamText silent failures as error-handling problem, not only provider problem |
| Model IDs/Prices | Do not hard-code; verify first before use |
Sources: skills/ai-sdk-core/SKILL.md
Provider Integration
Supported Providers
| Provider | Package | Models |
|---|---|---|
| OpenAI | @ai-sdk/openai | GPT-5, GPT-5.1 |
| Anthropic | @ai-sdk/anthropic | Claude 4.x series |
@ai-sdk/google | Gemini 2.5 |
Sources: skills/ai-sdk-core/SKILL.md
Cloudflare Workers Special Handling
Cloudflare Workers have strict startup budgets. When implementing AI SDK in Workers environments:
- Use lazy imports for AI SDK packages
- Defer model initialization until first request
- Apply the Workers-specific fix from
REFERENCE.md
Sources: skills/ai-sdk-core/SKILL.md
Fallback Chain
When primary references are unavailable or stale, use this fallback sequence:
graph LR
A[Request] --> B{REFERENCE.md Available?}
B -->|Yes| C[Use Detailed Reference]
B -->|No| D{Web Search Available?}
D -->|Yes| E[Search Official Docs]
D -->|No| F{npm view Available?}
F -->|Yes| G[Check Latest Version]
F -->|No| H[Use Stable v5 Default]| Priority | Source | Use Case |
|---|---|---|
| 1 | REFERENCE.md detailed reference | Migrations, errors, model notes |
| 2 | Web search / docs | Stale or missing version info |
| 3 | npm view ai versions | Version uncertainty |
| 4 | Stable v5 default | Last resort |
Sources: skills/ai-sdk-core/SKILL.md
Artifact Routing
| Artifact | Location | Purpose |
|---|---|---|
| Code changes | Project files (inline) | Implementation output |
| Detailed reference | REFERENCE.md (skill companion) | Migrations, errors, model notes |
| Original backup | data/skill-rd/active-split-backups/2026-05-02/ai-sdk-core.SKILL.original.md | Pre-split archive |
Sources: skills/ai-sdk-core/SKILL.md
Reference File Structure
skills/ai-sdk-core/
├── SKILL.md # Main skill file
├── REFERENCE.md # Detailed reference
├── references/
│ ├── v5-breaking-changes.md # v4→v5 migration guide
│ ├── top-errors.md # Error cookbook
│ ├── providers-quickstart.md # Provider setup
│ └── links-to-official-docs.md # External resources
├── templates/
│ ├── generate-text-basic.ts
│ ├── stream-text-chat.ts
│ └── generate-object-zod.ts
└── data/
└── skill-rd/
└── active-split-backups/ # Archive versions
Sources: skills/ai-sdk-core/SKILL.md
External Resources
| Resource | URL |
|---|---|
| Official Documentation | https://ai-sdk.dev/ |
| GitHub Repository | https://github.com/vercel/ai |
| GitHub Issues | https://github.com/vercel/ai/issues |
| GitHub Discussions | https://github.com/vercel/ai/discussions |
| Discord Community | https://discord.gg/vercel |
| AI SDK 5.0 Release Blog | https://vercel.com/blog/ai-sdk-5 |
| Zod Documentation | https://zod.dev/ |
Sources: skills/ai-sdk-core/references/links-to-official-docs.md
Complementary Skills
| Skill | Purpose |
|---|---|
| ai-sdk-ui | Frontend React hooks (useChat, useCompletion, useObject) |
| cloudflare-workers-ai | Native Cloudflare Workers AI binding (single-provider) |
Sources: skills/ai-sdk-core/references/links-to-official-docs.md
Keywords
The skill is triggered by these terms:
- ai sdk core, vercel ai sdk, ai sdk v5, ai sdk v6 beta, ai sdk 6
- agent abstraction, tool approval, reranking support
- human in the loop, generateText, streamText
- generateObject, streamObject, ai sdk node, ai sdk server
- zod ai schema, ai schema validation, ai tool calling
- ai agent class, openai sdk, anthropic sdk
Sources: skills/ai-sdk-core/SKILL.md
Source: https://github.com/s4b7-ai/s4b7-ai-skills / Human Manual
Agent Crystallization Protocol
Related topics: Crystallize - Pattern Extraction, Write A Skill - Authoring Guide
Continue reading this section for the full explanation and source context.
Continue reading this section for the full explanation and source context.
Continue reading this section for the full explanation and source context.
Continue reading this section for the full explanation and source context.
Related Pages
Related topics: Crystallize - Pattern Extraction, Write A Skill - Authoring Guide
Agent Crystallization Protocol
The Agent Crystallization Protocol is a systematic methodology for transforming implicit knowledge, problem-solving patterns, and learned insights from agent sessions into explicit, reusable, and discoverable skills. It serves as the intentional counterpart to automated pattern detection (SP-006), enabling agents to capture knowledge that emerges from reasoning and understanding rather than mere tool usage observation.
Purpose and Scope
The crystallization protocol addresses a fundamental challenge in agentic systems: knowledge decay and inability to reuse past solutions. When an agent successfully solves a complex problem, that solution remains trapped in session memory unless explicitly captured. The crystallization protocol provides the workflow, standards, and tooling to extract these patterns into durable skills that future sessions can leverage.
Primary Objectives:
| Objective | Description |
|---|---|
| Knowledge Preservation | Convert session insights into persistent, reusable artifacts |
| Pattern Formalization | Transform implicit heuristics into explicit, actionable workflows |
| Skill Discoverability | Ensure crystallized knowledge is findable and loadable by agents |
| Quality Assurance | Maintain skill standards through validation and documentation requirements |
| Organizational Learning | Enable cross-session and cross-domain knowledge transfer |
Scope Boundaries:
The protocol distinguishes between what should be crystallized and what should not:
- Crystallize: Novel problem-solving approaches, reusable workflows, decision heuristics, gotchas discovered through reasoning, cross-domain patterns
- Do Not Crystallize: Time-sensitive information (pricing, API versions), obvious operations derivable from codebase inspection, highly specific one-off solutions Sources: skills/crystallize/SKILL.md
Architecture Overview
The crystallization system operates as a closed loop between session execution and skill repository management:
graph TD
A[Agent Session] -->|Completes Task| B{Should this recur?}
B -->|Yes| C[Review Session]
B -->|No| Z[Session Ends]
C --> D[Extract Pattern]
D --> E[Check Scope]
E --> F{Skill overlap found?}
F -->|Yes| G[Update Existing Skill]
F -->|No| H[Create New Skill]
G --> I[Log Crystallization Metadata]
H --> I
I --> J[Skill Repository]
J -->|Future Sessions| ARelationship to SP-006
The protocol intentionally complements SP-006 (Latent Skill Observer), which automatically detects patterns from tool call sequences:
| Mechanism | Detection Method | Knowledge Type |
|---|---|---|
| SP-006 | Automated tool sequence analysis | Behavioral patterns from execution |
| Crystallization Protocol | Intentional reasoning-based extraction | Conceptual patterns from understanding |
Both mechanisms feed into the same skill namespace, ensuring that automatically detected and intentionally crystallized knowledge coexist and reinforce each other. Sources: skills/crystallize/SKILL.md
Crystallization Workflow
The standard crystallization workflow proceeds through seven discrete phases:
Phase 1: Review Session
Before extracting any pattern, the agent must thoroughly understand what was accomplished:
Review Questions:
- What was the original task?
- What problem was solved?
- What was learned that wasn't known before?
- What steps would be repeated identically in a similar future task?
This phase establishes the context necessary to determine whether crystallization is warranted and what form it should take. Sources: skills/crystallize/SKILL.md
Phase 2: Pattern Extraction
The core analytical phase where implicit knowledge becomes explicit. Extract four categories of information:
Key Steps: The minimal sequence of actions that produces the desired result. Include only essential steps; omit accidental details from the specific session.
Heuristics: The judgment calls required during execution. These are the "rule of thumb" decisions that determine success—where did the agent need to choose between approaches, and what guided that choice?
Gotchas: What went wrong or nearly went wrong. Include assumptions that failed, edge cases that weren't anticipated, and common mistakes in the domain.
Decision Points: Where the agent chose between competing approaches. Document both the choice made and the determining factors. Sources: skills/crystallize/SKILL.md
Phase 3: Exploratory Mode Expansion
When the operator requests deeper crystallization or explicitly invokes --exploratory-mode, the protocol expands one "ring" outward from the immediate fix:
graph LR
A[Exact Fix] --> B[Adjacent Surface 1]
A --> C[Adjacent Surface 2]
A --> D[Adjacent Surface 3]
B --> E{Same Stale Assumption?}
C --> E
D --> E
E -->|Yes| F[Capture Broader Pattern]
E -->|No| G[Leave Untouched]Exploratory Sweep Process:
- Identify the exact element that was fixed
- Check the nearest adjacent surfaces that could carry the same stale assumption
- Evaluate whether the extracted pattern applies broadly or is specific to one surface
- Capture the broader reusable rule if the pattern holds across surfaces
- Explicitly note which adjacent surfaces were checked and intentionally left untouched Sources: skills/crystallize/SKILL.md
Phase 4: Scope Determination
Before creating or updating skills, determine the appropriate scope:
| Scope | Location | Use Case |
|---|---|---|
| General patterns | ~/.agents/skills/<skill-name>/SKILL.md | Cross-domain, reusable anywhere |
| Enterprise-specific | ~/.agents/skills/<enterprise>/ | Domain-scoped, team-specific |
Scope determination prevents the creation of skills that are either too narrow (duplicating existing capabilities) or too broad (mixing concerns that should be separate). Sources: skills/crystallize/SKILL.md
Phase 5: Deduplication Search
Before creating a new skill, search for existing skills that may overlap:
Search Targets:
- Skills with similar triggers or descriptions
- Skills in adjacent domains that might subsume the new pattern
- Deprecated skills that might redirect to canonical locations
Decision Matrix:
| Scenario | Action |
|---|---|
| Exact overlap found | Extend existing skill with new section |
| Partial overlap found | Add to existing skill, avoid duplication |
| Related but distinct | Create as separate skill, consider cross-reference |
| No overlap found | Proceed with new skill creation |
If a related skill exists, add the new pattern as a new section or extend the existing workflow while preserving the skill's existing structure. Sources: skills/crystallize/SKILL.md
Phase 6: Skill Creation or Update
#### Creating a New Skill
Follow the standardized skill structure:
~/.agents/skills/<skill-name>/
├── SKILL.md # Primary skill definition
├── REFERENCE.md # Detailed reference (optional)
└── scripts/ # Utility scripts (if needed)
└── helper.js
#### Updating an Existing Skill
When extending an existing skill:
- Add new sections without modifying existing content structure
- Extend workflows only when the new pattern logically belongs
- Preserve all existing gotchas and decision points
- Update the "Crystallized From" metadata
#### SKILL.md Template Structure
Source: https://github.com/s4b7-ai/s4b7-ai-skills / Human Manual
Write A Skill - Authoring Guide
Related topics: Crystallize - Pattern Extraction, Skill Surgery R&D, Skill Structure & Anatomy
Continue reading this section for the full explanation and source context.
Continue reading this section for the full explanation and source context.
Continue reading this section for the full explanation and source context.
Related Pages
Related topics: Crystallize - Pattern Extraction, Skill Surgery R&D, Skill Structure & Anatomy
Write A Skill - Authoring Guide
Overview
The Write A Skill authoring guide provides a standardized template and methodology for creating reusable agent capabilities within the skills ecosystem. Skills are self-contained units of functionality that agents can load and invoke based on context, enabling modular and maintainable agent behavior. Sources: skills/write-a-skill/SKILL.md:1-15
This guide defines the canonical structure for skill development, including metadata requirements, workflow documentation patterns, and organizational best practices. The authoring framework ensures consistency across all skills while maintaining flexibility for diverse use cases.
Skill Anatomy
Core Components
Every skill follows a standardized directory structure to ensure predictability and discoverability:
skill-name/
├── SKILL.md # Primary documentation and entry point
├── REFERENCE.md # Advanced usage (optional)
├── docs/ # Additional documentation (if needed)
└── scripts/ # Utility scripts (if needed)
└── helper.js
Sources: skills/write-a-skill/SKILL.md:1-7
SKILL.md Template
The SKILL.md file serves as the primary interface for skill discovery and usage. It must follow this structure:
Sources: skills/write-a-skill/SKILL.md:1-7
Crystallize - Pattern Extraction
Related topics: Agent Crystallization Protocol, Write A Skill - Authoring Guide, Skill Surgery R&D
Continue reading this section for the full explanation and source context.
Continue reading this section for the full explanation and source context.
Continue reading this section for the full explanation and source context.
Continue reading this section for the full explanation and source context.
Related Pages
Related topics: Agent Crystallization Protocol, Write A Skill - Authoring Guide, Skill Surgery R&D
Crystallize - Pattern Extraction
Overview
Crystallize is a systematic skill for extracting reusable patterns from completed task sessions and capturing them as persistent, reusable skills. It transforms tacit knowledge gained during problem-solving into explicit, structured documentation that can be leveraged in future tasks.
The Crystallize skill serves as a complementary mechanism to SP-006 (latent skill observer), which automatically detects patterns from tool call sequences. While SP-006 observes tool usage, Crystallize adds intentional extraction from reasoning—patterns that emerge from understanding the problem domain, not just from observing execution traces.
Core Purpose
The primary objectives of Crystallize are:
| Objective | Description |
|---|---|
| Knowledge Capture | Transform implicit problem-solving knowledge into explicit documentation |
| Reuse Enablement | Create persistent skills that can be triggered in similar future contexts |
| Pattern Standardization | Establish consistent structures for skill documentation |
| Continuous Improvement | Build a growing library of battle-tested patterns |
Workflow
The Crystallize process follows a structured decision tree that determines whether a pattern warrants extraction and how it should be documented.
graph TD
A[Task Complete] --> B{Should this recur?}
B -->|Yes| C[Review Session]
B -->|No| Z[Done]
C --> D[Extract Pattern]
D --> E[Check Scope]
E --> F[Search Existing Skills]
F -->|Overlap Found| G[Update Existing]
F -->|No Overlap| H[Create New Skill]
G --> I[Log Crystallization]
H --> I
I --> ZPhase 1: Review
The review phase establishes context by answering fundamental questions about the completed task:
- What was the task? — Define the original objective
- What problem was solved? — Identify the core challenge
- What did I learn? — Extract the key insight or technique
- What steps would I repeat next time? — Determine the reusable sequence
Sources: skills/crystallize/SKILL.md:1-20
Phase 2: Pattern Extraction
This phase identifies the reusable elements from the completed session:
| Element | Description |
|---|---|
| Key Steps | Minimal sequence that produces the result |
| Heuristics | Judgment calls, rules of thumb that emerged |
| Gotchas | What went wrong or nearly went wrong; assumptions that failed |
| Decision Points | Where approaches were chosen; what determined the choice |
Phase 3: Scope Check
Determine whether the pattern is:
- General — Applicable across multiple domains or tasks
- Domain-Specific — Limited to a particular technology, framework, or context
Phase 4: Deduplication
Search existing skills to prevent overlap:
- Check for similar trigger phrases in other skill descriptions
- Evaluate whether the pattern extends or supersedes existing skills
- Make the create-vs-update decision
Phase 5: Create or Update Skill
#### Creating a New Skill
Place skills in the appropriate location based on scope:
| Scope | Location |
|---|---|
| General patterns | ~/.agents/skills/<skill-name>/SKILL.md |
| Enterprise-specific | ~/.agents/skills/<enterprise-subdirectory>/ |
#### Updating an Existing Skill
When overlap is found, add the new pattern as a new section or extend the existing workflow. Preserve the skill's existing structure while integrating the new information.
Phase 6: Log the Crystallization
Record metadata at the bottom of the skill under ## Crystallized From:
## Crystallized From
- Session: [date/context]
- Original task: [what was being solved]
- Pattern extracted: [what pattern was extracted]
- Exploratory mode notes: [adjacent surfaces checked and left untouched]
Crystallization Modes
The Crystallize skill supports multiple operational modes to handle different crystallization scenarios:
| Mode | Output | Trigger Phrases |
|---|---|---|
default | Full crystallization: review → extract → scope → deduplicate → create/update | crystallize, capture this as a skill |
quick | Fast capture to a minimal skill stub (full refinement later) | quick crystallize, mid-task pattern discovery |
exploratory | Expand one ring outward; check adjacent surfaces for same pattern | --exploratory-mode, more crystallization |
drag-response | Immediate crystallization triggered by operator frustration | this took too long, why aren't you using... |
correction | Immediate update from operator correction | Operator corrects an identity/path/boundary |
audit | Check what should have been crystallized but wasn't | what patterns did we miss |
Exploratory-Mode Expansion
When the operator requests exploratory mode, do not stop at the first local fix. Expand one ring outward using this sweep:
- Start from the exact thing that was fixed
- Check the nearest adjacent surfaces that could carry the same stale assumption
- Capture the broader reusable rule
Artifact Routing
All crystallization artifacts are routed to specific locations based on their type and purpose:
| Artifact Type | Path | Purpose |
|---|---|---|
| New skill | ~/.agents/skills/<slug>/SKILL.md | Reusable capability |
| Updated skill | Same path as existing skill | Extended capability |
| Crystallization log | docs/plans/crystallization-log.md | History of all crystallizations (optional) |
| Enterprise-specific skill | Appropriate ~/.agents/skills/ subdirectory | Domain-scoped capability |
SKILL.md Template
When creating a new crystallized skill, use this structure:
# Skill Name
One-line description. Use when [trigger phrases].
## When to Use
- [trigger 1]
- [trigger 2]
- [trigger 3]
## Workflow
1. [Step 1]
2. [Step 2]
3. [Step 3]
## Key Decisions
- [Decision point 1]: [default choice + why]
- [Decision point 2]: [default choice + why]
## Gotchas
- [Common mistake 1]
- [Common mistake 2]
## Crystallized From
- Session: [date/context]
- Original task: [what was being solved]
Fallback Chain
When primary methods are unavailable, Crystallize follows a fallback chain:
- Primary: Full workflow — review → extract → scope → deduplicate → create/update
- Quick mode unavailable: Capture to minimal stub
- Existing skills check fails: Create new skill without deduplication check
- Logging unavailable: Skip optional crystallization log entry
Relationship with SP-006
| Aspect | SP-006 | Crystallize |
|---|---|---|
| Detection Method | Automatic tool call sequence analysis | Intentional reasoning-based extraction |
| Input | Tool usage patterns | Session review and understanding |
| Trigger | Passive observation | Active decision to crystallize |
| Output | Latent skill candidates | Explicit, documented skills |
Both mechanisms feed the same skill namespace, meaning patterns captured via Crystallize become available alongside automatically detected patterns from SP-006.
Best Practices
- Capture decision rationale — Not just what was done, but why it was chosen over alternatives
- Include failure modes — Document what assumptions failed and what went wrong
- Be specific with triggers — Include exact phrases that should activate the skill
- Maintain minimal examples — Keep the workflow concise; detailed reference material can be separate files
- Log the crystallization context — Future maintainers need to understand the original problem
Sources: skills/crystallize/SKILL.md:1-20
Skill Surgery R&D
Related topics: Crystallize - Pattern Extraction, Write A Skill - Authoring Guide
Continue reading this section for the full explanation and source context.
Continue reading this section for the full explanation and source context.
Continue reading this section for the full explanation and source context.
Continue reading this section for the full explanation and source context.
Related Pages
Related topics: Crystallize - Pattern Extraction, Write A Skill - Authoring Guide
Skill Surgery R&D
Overview
Skill Surgery R&D is a specialized operational capability within the shadow-verse ecosystem designed to audit, maintain, and optimize the skill garden. It provides structured workflows for analyzing skill inventory, detecting overlaps, identifying gaps, and performing surgical interventions on skill files.
Purpose: The skill serves as a meta-level operations layer that ensures the skill ecosystem remains healthy, non-redundant, and properly aligned with user intents.
Scope: Skill Surgery R&D operates across the entire skill inventory, examining both structural integrity and semantic coverage of installed skills.
Sources: skills/skill-surgery-rd/SKILL.md
Architecture
Skill Surgery R&D Structure
skill-surgery-rd/
├── SKILL.md (main skill definition)
├── scripts/
│ ├── audit-skills.mjs (inventory scanner)
│ └── redirect-deprecated-skill.mjs (redirect migration)
├── data/skill-rd/
│ ├── skill-inventory.json (machine-readable catalog)
│ └── semantic-duplicate-clusters.json (overlap analysis)
└── ShadowArchive/80-reports/
└── skill-rd-YYYY-MM-DD.md (surgery reports)
Skill Classification Taxonomy
The system classifies skills into the following categories for surgical planning:
| Category | Definition | Treatment |
|---|---|---|
trigger-deprecated | Deprecated skill that still receives lookups | Redirect to canonical skill |
trigger-repair | Skill with weak "Use when..." triggers | Rewrite frontmatter description |
overlap | Multiple skills cover same user intent | Merge candidates |
stale-lane | Legacy skill with active-looking instructions but no active trigger | Deprecate gracefully |
runtime-gap | Workflow described but lacks deterministic scripts | Create helper scripts |
Sources: skills/skill-surgery-rd/SKILL.md
Operational Modes
Skill Surgery R&D supports multiple operational modes for different use cases:
| Mode | Output | When to Use |
|---|---|---|
default | Full audit → classify → propose surgeries | skill surgery, audit skills |
inventory | Scan and list all skills with metadata | inventory skills, list skills |
gaps | Gap classification only (no surgery) | skill gaps, what's missing |
overlaps | Overlap/duplicate detection | duplicate skills, overlaps |
redirect <old> <new> | Redirect deprecated skill to replacement | Specific redirect request |
merge <a> <b> | Merge two skills into canonical form | Specific merge request |
trim <skill> | Move detail from SKILL.md to REFERENCE.md | Specific trim request |
research <topic> | Research new skill candidates | research skill for X |
Sources: skills/skill-surgery-rd/SKILL.md
Surgical Operations
Surgery Decision Workflow
graph TD
A[Audit Skill Garden] --> B{Classification}
B -->|trigger-deprecated| C[Redirect Operation]
B -->|trigger-repair| D[Rewrite Frontmatter]
B -->|overlap| E[Merge Operation]
B -->|stale-lane| F[Trim + Deprecate]
B -->|runtime-gap| G[Create Scripts]
C --> H[Validate Changes]
D --> H
E --> H
F --> H
G --> H
H --> I[Report Outcomes]Surgery Types
#### 1. Redirect
Redirects a deprecated skill to its canonical replacement while preserving migration guidance.
# Redirect a deprecated skill
node /Users/sdluffy/.agents/skills/skill-surgery-rd/scripts/redirect-deprecated-skill.mjs \
--mapping=data/skill-rd/map.json
Validation criteria:
- Confirm target canonical skill exists
- Preserve migration notes in redirect
- Verify no active triggers point to deprecated path
#### 2. Trigger Repair
Rewrites the frontmatter description with concrete "Use when..." triggers.
Before:
Sources: skills/skill-surgery-rd/SKILL.md
Doramagic Pitfall Log
Source-linked risks stay visible on the manual page so the preview does not read like a recommendation.
The project should not be treated as fully validated until this signal is reviewed.
The project should not be treated as fully validated until this signal is reviewed.
Users cannot judge support quality until recent activity, releases, and issue response are checked.
The project may affect permissions, credentials, data exposure, or host boundaries.
Doramagic Pitfall Log
Doramagic extracted 7 source-linked risk signals. Review them before installing or handing real data to the project.
1. Project risk: Project risk needs validation
- Severity: medium
- Finding: Project risk is backed by a source signal: Project risk needs validation. Treat it as a review item until the current version is checked.
- User impact: The project should not be treated as fully validated until this signal is reviewed.
- Recommended check: Open the linked source, confirm whether it still applies to the current version, and keep the first run isolated.
- Evidence: identity.distribution | github_repo:1238156052 | https://github.com/s4b7-ai/s4b7-ai-skills | repo=s4b7-ai-skills; install=skills
2. Capability assumption: README/documentation is current enough for a first validation pass.
- Severity: medium
- Finding: README/documentation is current enough for a first validation pass.
- User impact: The project should not be treated as fully validated until this signal is reviewed.
- Recommended check: Open the linked source, confirm whether it still applies to the current version, and keep the first run isolated.
- Evidence: capability.assumptions | github_repo:1238156052 | https://github.com/s4b7-ai/s4b7-ai-skills | README/documentation is current enough for a first validation pass.
3. Maintenance risk: Maintainer activity is unknown
- Severity: medium
- Finding: Maintenance risk is backed by a source signal: Maintainer activity is unknown. Treat it as a review item until the current version is checked.
- User impact: Users cannot judge support quality until recent activity, releases, and issue response are checked.
- Recommended check: Open the linked source, confirm whether it still applies to the current version, and keep the first run isolated.
- Evidence: evidence.maintainer_signals | github_repo:1238156052 | https://github.com/s4b7-ai/s4b7-ai-skills | last_activity_observed missing
4. Security or permission risk: no_demo
- Severity: medium
- Finding: no_demo
- User impact: The project may affect permissions, credentials, data exposure, or host boundaries.
- Recommended check: Open the linked source, confirm whether it still applies to the current version, and keep the first run isolated.
- Evidence: downstream_validation.risk_items | github_repo:1238156052 | https://github.com/s4b7-ai/s4b7-ai-skills | no_demo; severity=medium
5. Security or permission risk: no_demo
- Severity: medium
- Finding: no_demo
- User impact: The project may affect permissions, credentials, data exposure, or host boundaries.
- Recommended check: Open the linked source, confirm whether it still applies to the current version, and keep the first run isolated.
- Evidence: risks.scoring_risks | github_repo:1238156052 | https://github.com/s4b7-ai/s4b7-ai-skills | no_demo; severity=medium
6. Maintenance risk: issue_or_pr_quality=unknown
- Severity: low
- Finding: issue_or_pr_quality=unknown。
- User impact: Users cannot judge support quality until recent activity, releases, and issue response are checked.
- Recommended check: Open the linked source, confirm whether it still applies to the current version, and keep the first run isolated.
- Evidence: evidence.maintainer_signals | github_repo:1238156052 | https://github.com/s4b7-ai/s4b7-ai-skills | issue_or_pr_quality=unknown
7. Maintenance risk: release_recency=unknown
- Severity: low
- Finding: release_recency=unknown。
- User impact: Users cannot judge support quality until recent activity, releases, and issue response are checked.
- Recommended check: Open the linked source, confirm whether it still applies to the current version, and keep the first run isolated.
- Evidence: evidence.maintainer_signals | github_repo:1238156052 | https://github.com/s4b7-ai/s4b7-ai-skills | release_recency=unknown
Source: Doramagic discovery, validation, and Project Pack records
Community Discussion Evidence
These external discussion links are review inputs, not standalone proof that the project is production-ready.
Count of project-level external discussion links exposed on this manual page.
Open the linked issues or discussions before treating the pack as ready for your environment.
Community Discussion Evidence
Doramagic exposes project-level community discussion separately from official documentation. Review these links before using s4b7-ai-skills with real data or production workflows.
- Project risk needs validation - GitHub / issue
Source: Project Pack community evidence and pitfall evidence