CR-2026-03-25: /deploy Skill — Implementation
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)
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.
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 |