source-command-commit-and-deploy
Skill0 starsChanged 6 months agoMITView on GitHub
Build, test, commit by feature, and deploy — adapts to any project's toolchain
- Commits and pushes
In this repository55 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-developmentSkill
- agent-teamsSkill
- ai-sdkSkill
- analyzing-financial-statementsSkill
- cache-componentsSkill
- chrome-devtoolsSkill
- Codex-automation-recommenderSkill
- Codex-md-improverSkill
- code-reviewSkill
- Command DevelopmentSkill
- creating-financial-modelsSkill
- data-visualizationSkill
- debugSkill
- develop-ai-functions-exampleSkill
- evolve-ai-layerSkill
- excalidraw-diagramSkill
- find-skillsSkill
- frontend-designSkill
- Hook DevelopmentSkill
- make-skill-templateSkill
- markdown-to-htmlSkill
- mcp-builderSkill
- MCP IntegrationSkill
- pdfSkill
- playwrightSkill
- Plugin SettingsSkill
- Plugin StructureSkill
- refactorSkill
- researchSkill
- security-best-practicesSkill
- skill-creatorSkill
- Skill DevelopmentSkill
- smithery-ai-cliSkill
- source-command-commitSkill
- source-command-create-prdSkill
- source-command-create-rulesSkill
- source-command-empty-redeploySkill
- source-command-evaluateSkill
- source-command-executeSkill
- source-command-handoffSkill
- source-command-plan-featureSkill
- source-command-primeSkill
- source-command-reviewSkill
- source-command-self-healSkill
- source-command-validateSkill
- sql-queriesSkill
- statistical-analysisSkill
- vscode-ext-localizationSkill
- webapp-testingSkill
- web-artifacts-builderSkill
- web-design-guidelinesSkill
- Writing Hookify RulesSkill
- xlsxSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. About 0 are common, 16 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈16
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use this skill when the user asks to run the migrated source command commit-and-deploy.
- Distinctive: line 17
Run these checks in order.
- Distinctive: line 34
Run the project's build command:
- Distinctive: line 51
Remove this comment block once customized.
- Distinctive: line 54
Run any project-specific validation scripts discovered in Step 1:
- Distinctive: line 64
Run tests in order of speed — fast feedback first:
- Distinctive: line 74
If the project has multiple test targets (e.g., a Python service alongside a JS frontend), run each:
- Distinctive: line 93
Before committing, check if any project docs need updating based on what changed:
- Distinctive: line 103
README.md: Update if commands, env vars, architecture, or setup changed
- Distinctive: line 105
Subproject READMEs: Update if that subsystem's endpoints, models, config, or architecture changed
- Very specific: line 145
If any AI layer files changed (AGENTS.md, .codex/rules/, .agents/skills/source-command-), add a Context: section to the commit body …
- Distinctive: line 151
If you committed on a feature branch in a worktree, merge it into main:
- Distinctive: line 170
If the merge has conflicts:
- Distinctive: line 173
Run the full validation suite (Phase 1) again after resolving
- Distinctive: line 174
Commit the merge resolution
- Distinctive: line 193
After pushing, note what deploy mechanisms exist:
- Distinctive: line 208
After a successful merge and push, remove the worktree and feature branch:
- Very specific: line 229
If git branch -d refuses (branch not fully merged), investigate — this usually means the merge in Phase 5 didn't complete.
- Distinctive: line 239
If deployment fails: check CI/CD logs (GitHub Actions, platform dashboard), verify builds locally, check platform console for errors.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
source-command-commit-and-deploy
Use this skill when the user asks to run the migrated source command commit-and-deploy.
Command Template
Commit and Deploy Workflow
Phase 1: Pre-Commit Validation
Run these checks in order. Fix failures before proceeding to the next level.
1. Discover Project Tools
# Identify package manager and scripts
cat package.json 2>/dev/null | grep -A 50 '"scripts"' | head -60
cat pyproject.toml 2>/dev/null | head -40
cat Makefile 2>/dev/null | grep '^[a-z]' | head -20
# Check for project-specific validation scripts
ls scripts/validate* scripts/check* 2>/dev/null
ls .github/workflows/ 2>/dev/null2. Build
Run the project's build command:
# Use whatever this project has:
# npm run build / pnpm build / yarn build
# cargo build / go build ./...
# uv run python -m py_compile main.py3. Project-Specific Checks
<!-- CUSTOMIZE: Add project-specific validation steps here.
Examples:
- maxDuration/timeout limit checks for serverless platforms
- Pipeline pattern validation scripts
- Docker builds for containerized services
- Schema drift checks
Remove this comment block once customized.
-->Run any project-specific validation scripts discovered in Step 1:
# Examples — use whatever this project has:
# ./scripts/validate-*.sh
# docker build -f {service}/Dockerfile .4. Tests
Run tests in order of speed — fast feedback first:
# Regression / smoke tests (if they exist separately)
# {test-runner} {regression-test-directory}
# Full test suite
# npm test / pnpm test / pytest / cargo testIf the project has multiple test targets (e.g., a Python service alongside a JS frontend), run each:
# Examples:
# cd {service-dir} && python3 -m pytest -v
# npm test5. Lint / Type Check (if not covered by build)
# Examples:
# npm run lint / npx tsc --noEmit
# ruff check . / mypy .
# cargo clippyPhase 2: Documentation Updates
Before committing, check if any project docs need updating based on what changed:
# Find documentation files in the project
ls README.md TASK.md CHANGELOG.md docs/ 2>/dev/null
ls -d */README.md 2>/dev/nullFor each doc that exists:
- README.md: Update if commands, env vars, architecture, or setup changed
- Task tracking files (TASK.md, TODO.md, etc.): Mark completed work, add discovered issues
- Subproject READMEs: Update if that subsystem's endpoints, models, config, or architecture changed
- User-facing docs (help pages, knowledge base): Review for accuracy if product behavior changed
Phase 3: Determine Context (Worktree or Main)
git branch --show-current
git worktree listDetermine if you're in a worktree (feature branch) or on main. The remaining phases adapt based on this.
Phase 4: Commit by Feature (CRITICAL)
Do NOT create one giant commit. Group changes by logical feature/purpose.
# Review everything
git status
git diff --stat HEAD
# Stage and commit by logical group — examples:
git add {frontend-files}
git commit -m "feat(ui): description of UI change"
git add {api-files}
git commit -m "feat(api): description of API change"
git add {schema/migration-files}
git commit -m "feat(db): description of schema change"
# Docs last, separately
git add README.md {other-docs}
git commit -m "docs: update documentation"Commit tags: feat, fix, refactor, docs, test, chore, perf
Include scope: feat(ui), fix(api), refactor(db), etc.
If any AI layer files changed (AGENTS.md, .codex/rules/, .agents/skills/source-command-), add a Context: section to the commit body explaining what changed and why.
Phase 5: Merge to Main (Worktree Only)
Skip this phase if already on main.
If you committed on a feature branch in a worktree, merge it into main:
# Capture the current branch and worktree path
FEATURE_BRANCH=$(git branch --show-current)
WORKTREE_PATH=$(pwd)
# Navigate to the main repo
MAIN_REPO=$(git worktree list | head -1 | awk '{print $1}')
cd "$MAIN_REPO"
# Ensure main is up to date
git checkout main
git pull origin main
# Merge the feature branch
git merge "$FEATURE_BRANCH"If the merge has conflicts:
- Resolve conflicts — favor the feature branch for new code, preserve main for unrelated changes
- Run the full validation suite (Phase 1) again after resolving
- Commit the merge resolution
Phase 6: Deploy
<!-- CUSTOMIZE: Replace with your project's deploy mechanism.
Examples:
- git push origin main (auto-deploys via Vercel/Netlify/Railway)
- gh workflow run deploy.yml
- ./scripts/deploy.sh
- kubectl apply -f k8s/
Note expected deploy times and any multi-service deploy order.
Remove this comment block once customized.
--># Push from the main repo directory (not the worktree)
git push origin mainAfter pushing, note what deploy mechanisms exist:
# Check for deploy automation
ls .github/workflows/ 2>/dev/null
cat vercel.json 2>/dev/null | head -5
cat netlify.toml 2>/dev/null | head -5
cat fly.toml 2>/dev/null | head -5
cat render.yaml 2>/dev/null | head -5Phase 7: Clean Up Worktree (Worktree Only)
Skip this phase if you were already on main.
After a successful merge and push, remove the worktree and feature branch:
# From the main repo directory
git worktree remove "$WORKTREE_PATH"
git branch -d "$FEATURE_BRANCH"Verify cleanup:
git worktree list
# Expected: only the main worktree remains (plus any other active feature worktrees)
git branch
# Expected: feature branch is gone
git status
# Expected: "nothing to commit, working tree clean"If git branch -d refuses (branch not fully merged), investigate — this usually means the merge in Phase 5 didn't complete. Do NOT force-delete with -D without understanding why.
Phase 8: Final Verification
git log --oneline -5
git status
# Expected: on main, clean tree, feature commits visible in logIf deployment fails: check CI/CD logs (GitHub Actions, platform dashboard), verify builds locally, check platform console for errors.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

