secondsky/claude-skills / plugins/claude-code-bash-patterns/skills/claude-code-bash-patterns
claude-code-bash-patterns
FlaggedClaude Code Bash tool patterns with hooks, automation, git workflows. Use for PreToolUse hooks, command chaining, CLI orchestration, custom commands, or encountering bash permissions, command failures, security guards, hook configurations.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 8.4 KB |
| references/cli-tool-integration.md | markdown | 4.8 KB |
| references/git-workflows.md | markdown | 9.7 KB |
| references/hooks-examples.md | markdown | 6.7 KB |
| references/security-best-practices.md | markdown | 4.1 KB |
| references/troubleshooting-guide.md | markdown | 8.4 KB |
| scripts/bash-audit-logger.shexecutable | script | 4.7 KB |
| scripts/dangerous-command-guard.pyexecutable | script | 6.4 KB |
| scripts/package-manager-enforcer.shexecutable | script | 2.3 KB |
| templates/.envrc.example | other | 5.7 KB |
| templates/custom-command-template.md | markdown | 5.1 KB |
| templates/dangerous-commands.json | config | 2.9 KB |
| templates/github-workflow.yml | config | 3.1 KB |
| templates/settings.json | config | 3.1 KB |
templates/github-workflow.yml
View on GitHubname: Claude Code CI/CD
# Example GitHub Actions workflow using Claude Code with bash automation
on:
pull_request:
branches: [main, develop]
push:
branches: [main, develop]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
- name: Build
run: npm run build
deploy-staging:
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/develop'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Deploy to Cloudflare Staging
run: npx wrangler deploy --env staging
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
- name: Run smoke tests
run: |
STAGING_URL="https://staging.example.com"
STATUS=$(curl -s -o /dev/null -w "%{http_code}" ${STAGING_URL}/health)
if [ "$STATUS" != "200" ]; then
echo "Health check failed with status: $STATUS"
exit 1
fi
echo "Staging deployment successful: $STAGING_URL"
deploy-production:
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/main'
environment:
name: production
url: https://example.com
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
- name: Build
run: npm run build
- name: Deploy to Cloudflare Production
run: npx wrangler deploy --env production
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
- name: Run smoke tests
run: |
PROD_URL="https://example.com"
STATUS=$(curl -s -o /dev/null -w "%{http_code}" ${PROD_URL}/health)
if [ "$STATUS" != "200" ]; then
echo "Health check failed with status: $STATUS"
echo "ALERT: Production deployment health check failed!"
exit 1
fi
echo "Production deployment successful: $PROD_URL"
- name: Create deployment tag
run: |
TAG="deploy-$(date +%Y%m%d-%H%M%S)"
git tag -a "$TAG" -m "Production deployment $TAG"
git push origin "$TAG"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Notify deployment
run: |
gh pr comment ${{ github.event.pull_request.number }} \
--body "✅ Deployed to production: https://example.com"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: github.event_name == 'pull_request'
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 465k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 465k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 465k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 192k | Updated | Claude CodeCodex | Verified | Install |