example-layered-skill
Example skill — reference implementation of the **internal** layered architecture pattern (Tools / Services / Utils) for complex skills with shared business logic. Use as a template when a skill outgrows a single scripts/execute.py file. Not intended for production use — see docs
#architecture
Install
npx skills add https://github.com/dcc-mcp/dcc-mcp-core/tree/main/examples/skills/example-layered-skill
claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install dcc-mcp-dcc-mcp-core@llmmart
git clone https://github.com/dcc-mcp/dcc-mcp-core.git
The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole dcc-mcp/dcc-mcp-core collection as a plugin from our marketplace. Git is the plain clone.
Skill manifest
Layered Skill Architecture — Reference
This skill demonstrates the internal layered organisation recommended for
complex skills (see docs/guide/skills.md
section "Complex Skill Architecture").
It is intentionally simple — three asset-management tools that share a small service object — so the structure, not the business logic, is the focus.
Layout
example-layered-skill/
├── SKILL.md ← this file (frontmatter + prose)
├── tools.yaml ← MCP tool declarations (sibling, per #356)
├── scripts/
│ ├── __init__.py
│ ├── create_asset.py ← thin tool adapters (parse params, return envelope)
│ ├── publish_asset.py
│ ├── validate_asset.py
│ ├── services/ ← business logic (orchestration, error handling)
│ │ ├── __init__.py
│ │ └── asset_service.py
│ └── utils/ ← pure helpers (no I/O, no DCC calls, fully unit-testable)
│ ├── __init__.py
│ └── path_utils.py
└── prompts/
└── system.md ← optional system prompt sidecar
Layer responsibilities
| Layer | Responsibility | Size guidance |
|---|---|---|
| tool scripts | Parse JSON params from stdin, validate, delegate, return envelope. | < 30 lines |
| services/ | Orchestrate DCC commands. Easily unit-testable in isolation. | Grows with feature |
| utils/ | Pure functions — path normalisation, primitive helpers. No side effects. | Grows with feature |
Tools exposed
| Tool | Description |
|---|---|
example_layered_skill__create_asset |
Create a new asset record |
example_layered_skill__publish_asset |
Publish an existing asset |
example_layered_skill__validate_asset |
Validate an asset against project rules (read-only) |
Why a sibling tools.yaml
Per #356, tool
declarations live in a sibling YAML referenced from
metadata.dcc-mcp.tools so that SKILL.md frontmatter stays
agentskills.io 1.0 compliant.
Files (dcc-mcp-core)
-
prompts
-
system.md 619 B
Loading…
-
-
scripts
-
services
-
asset_service.py 2.1 KB
Loading… -
__init__.py 54 B
Loading…
-
-
utils
-
path_utils.py 700 B
Loading… -
__init__.py 76 B
Loading…
-
-
create_asset.py 1.4 KB
Loading… -
publish_asset.py 1.1 KB
Loading… -
validate_asset.py 1.1 KB
Loading… -
__init__.py 78 B
Loading…
-
-
SKILL.md 3 KB
--- name: example-layered-skill description: >- Example skill — reference implementation of the **internal** layered architecture pattern (Tools / Services / Utils) for complex skills with shared business logic. Use as a template when a skill outgrows a single scripts/execute.py file. Not intended for production use — see docs/guide/skills.md for the architectural guide. license: MIT compatibility: Python 3.8+ allowed-tools: Bash Read metadata: dcc-mcp: dcc: python recall-context: app_type: python domain: authoring workflow_stage: authoring task_category: query version: "1.0.0" layer: example search-hint: "layered architecture, complex skill, services, utils, tools, asset pipeline reference, authoring reference" tags: "example, architecture, layered, advanced, authoring reference" tools: tools.yaml prompts: prompts/system.md --- # Layered Skill Architecture — Reference This skill demonstrates the **internal** layered organisation recommended for complex skills (see [`docs/guide/skills.md`](../../../docs/guide/skills.md) section "Complex Skill Architecture"). It is intentionally simple — three asset-management tools that share a small service object — so the **structure**, not the business logic, is the focus. ## Layout ```text example-layered-skill/ ├── SKILL.md ← this file (frontmatter + prose) ├── tools.yaml ← MCP tool declarations (sibling, per #356) ├── scripts/ │ ├── __init__.py │ ├── create_asset.py ← thin tool adapters (parse params, return envelope) │ ├── publish_asset.py │ ├── validate_asset.py │ ├── services/ ← business logic (orchestration, error handling) │ │ ├── __init__.py │ │ └── asset_service.py │ └── utils/ ← pure helpers (no I/O, no DCC calls, fully unit-testable) │ ├── __init__.py │ └── path_utils.py └── prompts/ └── system.md ← optional system prompt sidecar ``` ## Layer responsibilities | Layer | Responsibility | Size guidance | |-------|----------------|---------------| | **tool scripts** | Parse JSON params from stdin, validate, delegate, return envelope. | < 30 lines | | **services/** | Orchestrate DCC commands. Easily unit-testable in isolation. | Grows with feature | | **utils/** | Pure functions — path normalisation, primitive helpers. No side effects. | Grows with feature | ## Tools exposed | Tool | Description | |------|-------------| | `example_layered_skill__create_asset` | Create a new asset record | | `example_layered_skill__publish_asset` | Publish an existing asset | | `example_layered_skill__validate_asset` | Validate an asset against project rules (read-only) | ## Why a sibling `tools.yaml` Per [#356](https://github.com/dcc-mcp/dcc-mcp-core/issues/356), tool declarations live in a sibling YAML referenced from `metadata.dcc-mcp.tools` so that SKILL.md frontmatter stays agentskills.io 1.0 compliant. -
tools.yaml 1.7 KB
Loading…
Comments (0)
Sign in to join the conversation.
Reviews (0)
No reviews yet.
No comments yet.