CR-2026-03-25: Claude Code /deploy Skill Implementation
Change Summary
| Field | Value |
|---|---|
Change ID |
CR-2026-03-25-deploy-skill-001 |
Requested By |
Self (PRJ-claude-code-features) |
Target Date |
2026-03-25 |
Systems Affected |
|
Risk Level |
Low (automation of existing manual workflow) |
Rollback Time |
< 1 minute (delete skill directory) |
Change Window |
Any (personal development environment) |
Category |
Normal (follows full process) |
Business Justification
Problem Statement
Deploying documentation changes requires a multi-step workflow:
-
Commit spoke repo - Stage, commit with conventional format
-
Push spoke repo - Push to origin/main
-
Trigger rebuild - Push empty commit to domus-docs
-
Push domus-docs - Push trigger commit to origin/main
This manual process:
-
Takes ~45 seconds per deployment
-
Requires remembering exact paths and commands
-
Creates cognitive load during documentation flow
-
Results in inconsistent commit messages
-
Often forgotten (changes pushed but rebuild not triggered)
Current Workflow (Manual)
# In spoke repo (e.g., domus-captures)
git add -A
git commit -m "docs: Add new runbook"
git push origin main
# Trigger rebuild (must remember exact path)
git -C /home/evanusmodestus/atelier/_bibliotheca/domus-docs commit --allow-empty -m "chore: Trigger rebuild"
git -C /home/evanusmodestus/atelier/_bibliotheca/domus-docs push origin main
Solution: /deploy Skill
Single command that handles the entire workflow:
/deploy # Push and trigger rebuild
/deploy "docs: Add new runbook" # With commit message (if uncommitted changes)
Benefits (Quantified)
| Benefit | Measurement | Value |
|---|---|---|
Time savings |
45s → 5s per deploy |
~40 seconds saved per deploy |
Reduced errors |
No forgotten rebuild triggers |
100% rebuild rate |
Consistency |
Standardized commit format |
Clean git history |
Flow preservation |
Single command, no context switch |
Improved focus |
Learning reinforcement |
Skill shows commands executed |
Pattern internalization |
ROI Estimate: 5 deploys/day × 40s = 3.3 minutes/day = 20 hours/year recovered
Technical Specification
Skills Architecture Overview
Claude Code skills are markdown files with YAML frontmatter stored in:
| Scope | Path | Use Case |
|---|---|---|
Personal |
|
All projects |
Project |
|
Single repo only |
Skill Placement Decision
Recommendation: Personal scope (~/.claude/skills/deploy/)
Rationale:
-
Deploy workflow applies to ALL domus-* spoke repos
-
Avoids duplicating skill in each repo
-
Single maintenance point
-
User’s CLAUDE.md already documents personal config approach
File Structure
~/.claude/skills/
└── deploy/
└── SKILL.md # Skill definition
SKILL.md Specification
---
name: deploy
description: Deploy documentation changes. Push spoke repo and trigger domus-docs rebuild via Cloudflare Pages.
disable-model-invocation: true
user-invocable: true
allowed-tools: Bash(git:*), Bash(echo:*)
argument-hint: [commit-message]
---
Frontmatter Fields:
| Field | Value | Rationale |
|---|---|---|
|
|
Invoked as |
|
Full description |
Shown in skill menu, helps Claude understand when to suggest |
|
|
Only user triggers deploy (not automatic) |
|
|
Appears in |
|
|
Restrict to git commands only (security) |
|
|
Shows hint in autocomplete |
Skill Logic
/deploy invoked
│
├─► Check: Is this a domus-* spoke repo?
│ └─► No: Exit with helpful message
│
├─► Check: Any uncommitted changes?
│ ├─► Yes + no message: Prompt for message
│ └─► Yes + message provided: Commit with message
│
├─► Push spoke repo to origin/main
│
├─► Create empty commit in domus-docs
│ └─► Message: "chore: Trigger rebuild (<spoke-name>)"
│
├─► Push domus-docs to origin/main
│
└─► Report: URLs and status
Variable Substitutions
| Variable | Description |
|---|---|
|
Commit message if provided |
|
First argument (commit message) |
Environment Detection
Skill detects current repo via:
basename $(git rev-parse --show-toplevel)
Valid spoke repos (domus-* pattern):
-
domus-captures
-
domus-infra-ops
-
domus-ise-linux
-
domus-linux-ops
-
domus-netapi-docs
-
domus-python
-
domus-secrets-ops
-
domus-nvim (has embedded docs)
Official Documentation References
| Resource | URL |
|---|---|
Claude Code Skills Guide |
|
Skills Frontmatter Schema |
|
Allowed Tools Syntax |
Risk Analysis
Risk Matrix
| Risk | Description | Probability | Impact | Mitigation |
|---|---|---|---|---|
Accidental deploy |
Push unintended changes |
Low |
Medium |
|
Wrong branch |
Push to non-main branch |
Low |
Low |
Skill explicitly pushes to |
domus-docs conflict |
Concurrent deploys conflict |
Very Low |
Low |
Empty commits cannot conflict |
Skill not found |
Skill directory missing |
Low |
None |
Error message guides user to create |
Permission denied |
Git push fails (auth) |
Low |
Low |
Skill reports error, user can retry manually |
Impact Assessment
| Scenario | Impact |
|---|---|
During change |
None - file creation only |
After change - success |
Single |
After change - failure |
Skill not invoked; manual workflow still works |
Worst case |
Push fails mid-deploy; partial state easily recoverable |
Pre-Change Checklist
Prerequisites
-
Claude Code skills architecture documented
-
Current deploy workflow analyzed
-
Rollback procedure documented
-
Test scenarios identified
-
Learning-first approach maintained (commands visible)
Current State
| Metric | Pre-Change Value |
|---|---|
Deploy time (manual) |
~45 seconds |
Custom skills configured |
0 |
Skills directory exists |
Verify at implementation |
Deploy success rate |
~80% (forgot trigger sometimes) |
Implementation Procedure
Phase 1: Create Skills Directory
mkdir -p ~/.claude/skills/deploy
ls -la ~/.claude/skills/
Expected: deploy/ directory exists
Phase 2: Create SKILL.md
Create ~/.claude/skills/deploy/SKILL.md with full skill definition.
---
name: deploy
description: Deploy documentation changes. Push spoke repo and trigger domus-docs rebuild via Cloudflare Pages.
disable-model-invocation: true
user-invocable: true
allowed-tools: Bash(git:*), Bash(echo:*)
argument-hint: [commit-message]
---
# /deploy - Documentation Deployment
Deploy the current spoke repo and trigger a domus-docs rebuild.
## What This Does
1. Verifies you're in a domus-* spoke repository
2. Commits any staged/unstaged changes (if message provided)
3. Pushes spoke repo to origin/main
4. Triggers Cloudflare Pages rebuild via domus-docs empty commit
5. Reports deployment status
## Usage
```
/deploy # Push and trigger (no new commit)
/deploy "docs: Add backup runbook" # Commit message for uncommitted changes
```
## Architecture
```
Spoke Repos (domus-captures, domus-infra-ops, etc.)
↓ push to GitHub
domus-docs (aggregator)
↓ push triggers
Cloudflare Pages (auto-build)
↓ fetches all repos via HTTPS
https://docs.domusdigitalis.dev
```
## Commands Executed
The skill runs these git commands:
```bash
# 1. Verify repo type
REPO_NAME=$(basename $(git rev-parse --show-toplevel))
# 2. If message provided and changes exist
git add -A
git commit -m "$MESSAGE"
# 3. Push spoke repo
git push origin main
# 4. Trigger rebuild
git -C ~/atelier/_bibliotheca/domus-docs commit --allow-empty -m "chore: Trigger rebuild ($REPO_NAME)"
git -C ~/atelier/_bibliotheca/domus-docs push origin main
```
---
## Your Task
Arguments received: $ARGUMENTS
Execute the deployment workflow:
1. **Identify repo**: Run `basename $(git rev-parse --show-toplevel)` to get repo name
2. **Validate**: Ensure repo name starts with `domus-` (spoke repo check)
3. **Check status**: Run `git status --short` to see uncommitted changes
4. **If changes exist AND message provided**: Commit with the provided message
5. **If changes exist AND no message**: Ask user for commit message first
6. **Push spoke**: Run `git push origin main`
7. **Trigger rebuild**:
```bash
git -C /home/evanusmodestus/atelier/_bibliotheca/domus-docs commit --allow-empty -m "chore: Trigger rebuild (REPO_NAME)"
git -C /home/evanusmodestus/atelier/_bibliotheca/domus-docs push origin main
```
8. **Report**: Confirm deployment triggered, show Cloudflare Pages URL
**IMPORTANT**: Show each command as you execute it so the user learns the underlying workflow.
Phase 3: Verify Skill Discovery
# Restart Claude Code or start new session
# Type /deploy and check autocomplete
Expected: /deploy appears in autocomplete with description
Phase 4: Functional Testing
| Test | Action | Expected Result |
|---|---|---|
Test 1: Non-domus repo |
Run |
Error: "Not a domus-* spoke repository" |
Test 2: Clean state |
Run |
Pushes spoke, triggers rebuild |
Test 3: With changes |
Run |
Commits, pushes spoke, triggers rebuild |
Test 4: Verify rebuild |
Check Cloudflare Pages dashboard |
New build triggered |
Post-Change Validation
State Comparison
| Metric | Pre-Change | Post-Change |
|---|---|---|
Deploy time |
~45 seconds |
~5 seconds |
Custom skills |
0 |
1 |
Commands to deploy |
4-5 |
1 |
Forgot rebuild trigger |
~20% of deploys |
0% |
Monitoring Checklist
-
/deployappears in autocomplete -
Skill executes without errors
-
Spoke repo pushes successfully
-
domus-docs trigger commit created
-
Cloudflare Pages build initiated
-
Commands visible during execution (learning-first)
Rollback Procedure
Trigger Conditions
Initiate rollback if ANY of:
-
Skill causes unintended commits
-
Push behavior unexpected
-
Conflicts with manual workflow
-
User prefers manual control
Rollback Steps
# 1. Remove skill
rm -rf ~/.claude/skills/deploy
# 2. Verify removal
ls ~/.claude/skills/
# 3. Restart Claude Code session
Rollback Verification
-
/deployno longer in autocomplete -
Manual workflow unchanged
-
No orphaned configuration
Scope Management
In Scope
-
/deployskill creation -
Spoke repo push automation
-
domus-docs rebuild trigger
-
Learning-first command visibility
Out of Scope (Future CRs)
-
Branch selection (always uses main)
-
Dry-run mode
-
Batch deploy (multiple repos)
-
Slack/webhook notifications
-
Build status polling
Amendment Process
If scope changes are required during implementation:
-
Document the proposed change in "Amendments" section
-
Assess impact on timeline, risk, and benefits
-
Approve minor changes (self-approval for low-risk)
-
Escalate major changes to new CR
Amendments
No amendments at this time.
Sign-Off
| Role | Name | Date |
|---|---|---|
Author |
Claude (AI) |
2026-03-25 |
Technical Review |
Evan Rosado |
(pending) |
Approval |
Evan Rosado |
(pending) |
Lessons Learned
To be completed post-implementation.
Questions to Answer
-
Did the skill improve deployment frequency?
-
Was command visibility sufficient for learning?
-
Should argument handling be extended?
-
Other skills to model after this pattern?
Appendix A: Full SKILL.md Source
See Phase 2 implementation section for complete source.
Appendix B: Integration with Existing Hooks
The /deploy skill complements existing hooks:
| Component | Timing | Function |
|---|---|---|
AsciiDoc Attr Hook |
PostToolUse (Edit) |
Validates attributes BEFORE commit |
|
User-invoked |
Pushes validated changes, triggers build |
Cloudflare Pages |
Post-push |
Auto-builds from domus-docs |
Related Documentation
-
PRJ-claude-code-features - Parent project
-
CR: Claude Code Hooks - Hook implementation pattern