ワンクリックで
cfn-deployment
Automated skill deployment pipeline for CFN Loop integration
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Automated skill deployment pipeline for CFN Loop integration
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | cfn-deployment |
| version | 1.0.0 |
| description | Automated skill deployment pipeline for CFN Loop integration |
| author | Task 1.1 Implementation Team |
| dependencies | [] |
| tags | ["deployment","automation","skills","pipeline"] |
Automated skill deployment pipeline that transitions approved skills from APPROVED → DEPLOYED state with atomic cross-database transactions, validation, and rollback capability.
This skill enables CFN Loop agents to deploy skills to production through a fully automated pipeline that ensures:
# Deploy a skill from approved directory
./scripts/deploy-approved-skills.sh .claude/skills/authentication
# Deploy with explicit version
./scripts/deploy-approved-skills.sh .claude/skills/authentication --version=2.0.0
# Deploy with user attribution
./scripts/deploy-approved-skills.sh .claude/skills/authentication --deployed-by=admin@example.com
# Skip validation (admin only, dangerous)
./scripts/deploy-approved-skills.sh .claude/skills/authentication --skip-validation
import { DatabaseService } from './src/lib/database-service';
import { SkillDeploymentPipeline } from './src/services/skill-deployment';
const dbService = new DatabaseService({
sqlite: {
type: 'sqlite',
database: './data/cfn-loop.db',
},
});
await dbService.connect();
const pipeline = new SkillDeploymentPipeline(dbService);
const result = await pipeline.deploySkill({
skillPath: '.claude/skills/authentication',
deployedBy: 'system',
});
if (result.success) {
console.log(`Deployed: ${result.skillName} v${result.version}`);
} else {
console.error(`Deployment failed: ${result.error}`);
}
await dbService.disconnect();
Before deployment, the pipeline validates:
APPROVED → DEPLOYING → DEPLOYED (success)
→ FAILED (validation/error)
→ ROLLED_BACK (rollback triggered)
Deployment is atomic across:
All operations succeed or all are rolled back.
// Rollback a deployment
const success = await pipeline.rollbackDeployment(deploymentId);
if (success) {
console.log('Deployment rolled back successfully');
}
// Get deployment history for a skill
const history = await pipeline.getDeploymentHistory('authentication', 10);
history.forEach(audit => {
console.log(`${audit.deployed_at}: ${audit.from_status} → ${audit.to_status}`);
});
The pipeline provides detailed error messages:
const result = await pipeline.deploySkill({ skillPath: '/invalid/path' });
if (!result.success) {
console.error('Error:', result.error);
if (result.validationResult) {
result.validationResult.errors.forEach(err => {
console.error(`- ${err.code}: ${err.message}`);
});
}
}
All deployment operations are recorded in the deployment_audit table:
SELECT
skill_id,
from_status,
to_status,
version,
success,
deployed_by,
deployed_at,
error_message
FROM deployment_audit
WHERE skill_id = 'skill-authentication-1.0.0-1234567890'
ORDER BY deployed_at DESC;
--skip-validation sparingly)--deployed-by parameterThe deployment pipeline integrates with Phase 4 workflow patterns (future enhancement):
// Future: Deploy to PostgreSQL workflow_patterns table
const tx = await dbService.executeTransaction([
{
database: 'sqlite',
operation: async (adapter) => {
return adapter.insert('skills', { ... });
},
},
{
database: 'postgres',
operation: async (adapter) => {
return adapter.insert('workflow_patterns', {
skill_id: skillId,
version: version,
status: 'DEPLOYED',
});
},
},
]);
CFN coordinators can use this skill to automate skill deployment:
# In CFN Loop coordinator agent
SKILL_PATH=".claude/skills/new-skill"
if [[ -f "$SKILL_PATH/SKILL.md" ]]; then
./scripts/deploy-approved-skills.sh "$SKILL_PATH" --deployed-by="cfn-coordinator"
echo "Skill deployed successfully"
fi
Planned dashboard features:
Comprehensive test coverage (95%+) ensures:
Run tests:
npm test -- tests/skill-deployment.test.ts
Problem: Skill with same name already exists
Solution: Either:
Problem: Version already exists for this skill
Solution: Either:
--version)Problem: execute.sh doesn't have execute permissions
Solution:
chmod +x .claude/skills/your-skill/execute.sh
Problem: SQLite database not accessible
Solution:
Tiered planning orchestrator. Runs the full SPARC+ pipeline (research, spec, decide, pseudo, data, arch, ux, design, test, ops) as a parallel DAG, scaled by build stage (mvp/beta/enterprise) via inclusion profiles. Enforces two gates: every success criterion is executable (verifiable-done) and every step is unambiguous (haiku-executable). Use as the entry point for any non-trivial build instead of cfn-spa-plan.
Post-planning completeness review. Extracts assumptions, traces dependencies, analyzes blast radius, checks alpha-readiness, surfaces gaps before implementation. Use after writing any plan that touches data, APIs, or shared state.
SPARC Specification phase. Make testable acceptance criteria, edge cases, pre/post conditions, invariants BEFORE planning implementation. Use when starting any non-trivial task to lock intent, surface ambiguity early.
Test-strategy phase of cfn-megaplan. Designs test depth properly: fixtures/test-data, the unit/integration/contract/e2e/load split, mocking strategy, and non-functional tests, instead of lumping everything into a vague red phase. Feeds Bar A (verifiable-done): every acceptance criterion becomes a concrete runnable check. Use after cfn-spec, cfn-arch, and (if frontend) cfn-ux.
Pre-edit backup + post-edit validation for safe file edits. Use to capture file state before edits, validate changes after edits, revert files to prior state, or ensure edit safety via auto backup/validation hooks.
Extract complete Redis coordination data from completed CFN Loop tasks and structure into comprehensive JSON analysis files