Skip to content

notque/vexjoy-agent / skills/programming/programming

programming

Flagged

Language rules, workflows, and tooling: Go, Python, Rust, Kotlin, Swift, PHP, TypeScript type checks and debugging, OpenStack Python, MCP local-docs servers, Node.js backend APIs.

FileKindSize
SKILL.mdskill md19.3 KB
references/go/code-review.mdmarkdown12.0 KB
references/go/code-review/common-review-comments.mdmarkdown6.6 KB
references/go/concurrency.mdmarkdown11.5 KB
references/go/concurrency/concurrency-patterns.mdmarkdown5.7 KB
references/go/error-handling.mdmarkdown10.8 KB
references/go/error-handling/patterns.mdmarkdown4.2 KB
references/go/google-style-guide/SHA256SUMSother313 B
references/go/google-style-guide/UPSTREAM_REVISIONother41 B
references/go/google-style-guide/best-practices/part-01.mdmarkdown10.0 KB
references/go/google-style-guide/best-practices/part-02.mdmarkdown15.0 KB
references/go/google-style-guide/best-practices/part-03.mdmarkdown14.1 KB
references/go/google-style-guide/best-practices/part-04.mdmarkdown13.5 KB
references/go/google-style-guide/best-practices/part-05.mdmarkdown10.5 KB
references/go/google-style-guide/best-practices/part-06.mdmarkdown14.4 KB
references/go/google-style-guide/best-practices/part-07.mdmarkdown16.1 KB
references/go/google-style-guide/best-practices/part-08.mdmarkdown11.4 KB
references/go/google-style-guide/best-practices/part-09.mdmarkdown13.7 KB
references/go/google-style-guide/best-practices/part-10.mdmarkdown16.9 KB
references/go/google-style-guide/decisions/part-01.mdmarkdown15.0 KB
references/go/google-style-guide/decisions/part-02.mdmarkdown12.5 KB
references/go/google-style-guide/decisions/part-03.mdmarkdown11.5 KB
references/go/google-style-guide/decisions/part-04.mdmarkdown8.4 KB
references/go/google-style-guide/decisions/part-05.mdmarkdown9.8 KB
references/go/google-style-guide/decisions/part-06.mdmarkdown14.7 KB
references/go/google-style-guide/decisions/part-07.mdmarkdown13.3 KB
references/go/google-style-guide/decisions/part-08.mdmarkdown14.3 KB
references/go/google-style-guide/decisions/part-09.mdmarkdown15.3 KB
references/go/google-style-guide/decisions/part-10.mdmarkdown8.3 KB
references/go/google-style-guide/guide/part-01.mdmarkdown16.3 KB
references/go/google-style-guide/guide/part-02.mdmarkdown3.0 KB
references/go/google-style-guide/index.mdmarkdown8.4 KB
references/go/preferred-patterns.mdmarkdown12.5 KB
references/go/preferred-patterns/code-examples.mdmarkdown11.6 KB
references/go/quality-gate.mdmarkdown7.3 KB
references/go/quality-gate/common-lint-errors.jsonconfig7.6 KB
references/go/quality-gate/examples.mdmarkdown11.0 KB
references/go/quality-gate/makefile-targets.jsonconfig5.1 KB
references/go/sapcc-conventions.mdmarkdown34.6 KB
references/go/sapcc-conventions/api-design-detailed.mdmarkdown22.7 KB
references/go/sapcc-conventions/architecture-patterns.mdmarkdown18.6 KB
references/go/sapcc-conventions/build-ci-detailed.mdmarkdown18.7 KB
references/go/sapcc-conventions/error-handling-detailed.mdmarkdown20.1 KB
references/go/sapcc-conventions/extended-patterns.mdmarkdown7.1 KB
references/go/sapcc-conventions/go-bits-philosophy-detailed.mdmarkdown24.5 KB
references/go/sapcc-conventions/library-reference.mdmarkdown14.0 KB
references/go/sapcc-conventions/pr-mining-insights.mdmarkdown17.5 KB
references/go/sapcc-conventions/review-standards.mdmarkdown10.5 KB
references/go/sapcc-conventions/sapcc-code-patterns.mdmarkdown46.2 KB
references/go/testing.mdmarkdown9.7 KB
references/go/testing/go-benchmark-and-concurrency.mdmarkdown5.6 KB
references/go/testing/go-test-patterns.mdmarkdown9.0 KB
references/golang-general.mdmarkdown8.9 KB
references/golang-general/go-modern-code.mdmarkdown17.2 KB
references/golang-general/go-verification-workflow.mdmarkdown5.0 KB
references/golang-general/go-version-idioms.mdmarkdown6.8 KB
references/kotlin-general.mdmarkdown7.5 KB
references/kotlin-general/kotlin-patterns.mdmarkdown7.9 KB
references/kotlin-general/kotlin-security-testing.mdmarkdown4.4 KB
references/kotlin-general/kotlin-security.mdmarkdown11.1 KB
references/kotlin/concurrency-patterns.mdmarkdown5.4 KB
references/kotlin/kotlin-testing.mdmarkdown7.9 KB
references/mcp-local-docs.mdmarkdown6.9 KB
references/mcp-local-docs/mcp-patterns.mdmarkdown9.6 KB
references/mcp-local-docs/mcp-preferred-patterns.mdmarkdown6.9 KB
references/mcp-local-docs/server-templates.mdmarkdown4.4 KB
references/mcp-local-docs/typescript-async-patterns.mdmarkdown8.9 KB
references/nodejs-api.mdmarkdown7.3 KB
references/nodejs-api/auth-patterns.mdmarkdown10.0 KB
references/nodejs-api/middleware-patterns.mdmarkdown10.5 KB
references/nodejs-api/nodejs-security.mdmarkdown12.3 KB
references/nodejs-api/webhook-patterns.mdmarkdown9.9 KB
references/php-general.mdmarkdown4.7 KB
references/php-general/php-behaviors.mdmarkdown5.2 KB
references/php-general/php-conventions.mdmarkdown5.8 KB
references/php/modern-php-features.mdmarkdown4.4 KB
references/php/testing-patterns.mdmarkdown7.5 KB
references/python-general.mdmarkdown7.7 KB
references/python-general/flask-jinja-webapp.mdmarkdown5.7 KB
references/python-general/python-local-gates.mdmarkdown4.4 KB
references/python-general/python-modern-code.mdmarkdown23.1 KB
references/python-openstack.mdmarkdown5.2 KB
references/python-openstack/error-handling.mdmarkdown658 B
references/python-openstack/hacking-rules.mdmarkdown4.1 KB
references/python-openstack/openstack-patterns.mdmarkdown1.2 KB
references/python-openstack/oslo-patterns.mdmarkdown6.4 KB
references/python-openstack/output-format.mdmarkdown2.4 KB
references/python-openstack/preferred-patterns.mdmarkdown1.9 KB
references/python-openstack/rpc-versioning.mdmarkdown5.3 KB
references/rust-general.mdmarkdown8.2 KB
references/rust-general/rust-modern-code.mdmarkdown13.4 KB
references/rust-general/rust-verification-workflow.mdmarkdown5.5 KB
references/rust-general/rust-version-idioms.mdmarkdown7.0 KB
references/swift-general.mdmarkdown5.7 KB
references/swift-general/swift-patterns.mdmarkdown6.7 KB
references/swift-general/swift-security-testing.mdmarkdown6.6 KB
references/swift-general/swift-security.mdmarkdown13.3 KB
references/swift/preferred-patterns.mdmarkdown2.4 KB
references/swift/swift-testing.mdmarkdown6.6 KB
references/swift/task-patterns.mdmarkdown3.6 KB
references/typescript-debugging.mdmarkdown9.3 KB
references/typescript-debugging/debugging-workflows-async-memory.mdmarkdown5.8 KB
references/typescript-debugging/debugging-workflows.mdmarkdown5.6 KB
scripts/bench-compare.shscript7.1 KB
scripts/check-errors.shscript7.1 KB
scripts/check-interface-compliance.shscript6.4 KB
scripts/check-sapcc-auth-ordering.shscript5.5 KB
scripts/check-sapcc-httptest.shscript4.4 KB
scripts/check-sapcc-identify-endpoint.shscript5.8 KB
scripts/check-sapcc-json-strict.shscript4.9 KB
scripts/check-sapcc-time-now.shscript4.2 KB
scripts/check-sapcc-todo-format.shscript4.1 KB
scripts/gen-table-test.shscript4.2 KB
scripts/quality_checker.pyscript16.2 KB
scripts/sync-google-style-guide.pyscript2.5 KB
scripts/validate.pyscript6.3 KB

references/go/quality-gate/examples.md

View on GitHub
# Go PR Quality Gate - Usage Examples

**Note**: Examples using `fish -c` assume Fish shell is installed. You can substitute with your shell of choice (e.g., `bash -c`).

## Example 1: Successful Quality Check

### Scenario
All quality checks pass with good coverage.

### Command
```bash
cd /path/to/go-project
python3 ~/.claude/skills/programming/scripts/quality_checker.py --verbose
```

### Expected Output (JSON)
```json
{
  "status": "success",
  "coverage": "87.3%",
  "checks_passed": ["static-check", "test", "coverage"],
  "summary": "All quality checks passed"
}
```

### Expected Output (stderr with --verbose)
```
๐Ÿ” Running quality checks...
  โ”œโ”€ Static analysis... โณ
  โ”œโ”€ Unit tests... โณ
  โ””โ”€ Coverage report... โณ

โœ… All quality checks passed
๐Ÿ“Š Coverage: 87.3%
```

### Next Steps
1. View detailed coverage report: `fish -c 'open build/cover.html'`
2. Create commit if ready
3. Push changes for PR review

---

## Example 2: Linting Errors (errcheck)

### Scenario
Code has unchecked error returns.

### Command
```bash
cd /path/to/go-project
python3 ~/.claude/skills/programming/scripts/quality_checker.py
```

### Expected Output (JSON)
```json
{
  "status": "failed",
  "exit_code": 2,
  "errors": {
    "linting": [
      {
        "linter": "errcheck",
        "file": "pkg/api/handler.go",
        "line": 45,
        "column": 2,
        "message": "Error return value of `resp.Body.Close` is not checked",
        "description": "Unchecked error returns - detects when error values are not checked",
        "fix_suggestion": "Check error return values or explicitly ignore with _ = err. Common pattern: if err != nil { return err }",
        "severity": "high"
      },
      {
        "linter": "errcheck",
        "file": "pkg/service/processor.go",
        "line": 123,
        "column": 5,
        "message": "Error return value of `file.Close` is not checked",
        "description": "Unchecked error returns - detects when error values are not checked",
        "fix_suggestion": "Check error return values or explicitly ignore with _ = err. Common pattern: if err != nil { return err }",
        "severity": "high"
      }
    ]
  },
  "fix_commands": [],
  "error_count": 2,
  "summary": "Quality checks failed with 2 errors"
}
```

### Fix
```go
// Before (error)
defer resp.Body.Close()

// After (fixed)
defer func() {
    if err := resp.Body.Close(); err != nil {
        log.Printf("failed to close response body: %v", err)
    }
}()
```

---

## Example 3: Import Formatting Issues

### Scenario
Imports are not properly formatted.

### Command
```bash
python3 ~/.claude/skills/programming/scripts/quality_checker.py
```

### Expected Output (JSON)
```json
{
  "status": "failed",
  "exit_code": 2,
  "errors": {
    "linting": [
      {
        "linter": "goimports",
        "file": "pkg/api/routes.go",
        "line": 5,
        "column": 1,
        "message": "File is not `goimports`-ed",
        "description": "Import formatting issues - detects improperly formatted or missing imports",
        "fix_suggestion": "Run: make goimports (or goimports -w .)",
        "severity": "low"
      }
    ]
  },
  "fix_commands": ["make goimports"],
  "error_count": 1,
  "summary": "Quality checks failed with 1 errors"
}
```

### Fix
```bash
fish -c "make goimports"
# Re-run checks
python3 ~/.claude/skills/programming/scripts/quality_checker.py
```

---

## Example 4: Test Failures

### Scenario
Unit tests are failing.

### Command
```bash
python3 ~/.claude/skills/programming/scripts/quality_checker.py --verbose
```

### Expected Output (JSON)
```json
{
  "status": "failed",
  "exit_code": 2,
  "errors": {
    "tests": [
      {
        "package": "github.com/your-org/project/pkg/service",
        "test": "TestProcessRequest",
        "error": "Test failed - check output for details",
        "type": "test_failure"
      }
    ]
  },
  "fix_commands": [],
  "error_count": 1,
  "summary": "Quality checks failed with 1 errors"
}
```

### Expected Output (stderr with --verbose)
```
โŒ Quality checks failed (exit code: 2)
๐Ÿ“Š Total errors: 1

๐Ÿงช Test failures: 1
  โ€ข TestProcessRequest in github.com/your-org/project/pkg/service
```

### Debug
```bash
# Run specific test with verbose output
fish -c "go test -v -run TestProcessRequest ./pkg/service"
```

---

## Example 5: Multiple Error Types

### Scenario
Mix of linting errors, test failures, and license issues.

### Command
```bash
python3 ~/.claude/skills/programming/scripts/quality_checker.py --verbose
```

### Expected Output (JSON)
```json
{
  "status": "failed",
  "exit_code": 2,
  "errors": {
    "linting": [
      {
        "linter": "errcheck",
        "file": "pkg/api/handler.go",
        "line": 45,
        "column": 2,
        "message": "Error return value not checked",
        "description": "Unchecked error returns",
        "fix_suggestion": "Check error return values or explicitly ignore with _ = err",
        "severity": "high"
      },
      {
        "linter": "gosec",
        "file": "pkg/crypto/hash.go",
        "line": 23,
        "column": 10,
        "message": "Use of weak cryptographic primitive (G401)",
        "description": "Security vulnerabilities",
        "fix_suggestion": "Review security issue and apply recommended fix. Common issues: weak crypto, command injection, SQL injection",
        "severity": "critical"
      }
    ],
    "tests": [
      {
        "package": "github.com/your-org/project/pkg/service",
        "test": "TestProcessRequest",
        "error": "Test failed - check output for details",
        "type": "test_failure"
      }
    ]
  },
  "fix_commands": [],
  "error_count": 3,
  "summary": "Quality checks failed with 3 errors"
}
```

### Expected Output (stderr with --verbose)
```
โŒ Quality checks failed (exit code: 2)
๐Ÿ“Š Total errors: 3

๐Ÿ” Linting errors: 2
  โ€ข errcheck: 1 issues
    โ€ข pkg/api/handler.go:45: Error return value not checked
  โ€ข gosec: 1 issues
    โ€ข pkg/crypto/hash.go:23: Use of weak cryptographic primitive (G401)

๐Ÿงช Test failures: 1
  โ€ข TestProcessRequest in github.com/your-org/project/pkg/service
```

### Fix Process
1. **Fix critical security issue first** (gosec - weak crypto)
2. **Fix errcheck issues**
3. **Fix failing tests**
4. **Re-run checks**

---

## Example 6: Coverage Threshold Check

### Scenario
Check if coverage meets minimum threshold.

### Command
```bash
python3 ~/.claude/skills/programming/scripts/quality_checker.py --min-coverage 80.0
```

### Expected Output (coverage below threshold)
```json
{
  "status": "failed",
  "coverage": "75.3%",
  "checks_passed": ["static-check", "test", "coverage"],
  "coverage_check": {
    "required": 80.0,
    "actual": 75.3,
    "passed": false
  },
  "summary": "All quality checks passed"
}
```

### Expected Output (coverage meets threshold)
```json
{
  "status": "success",
  "coverage": "87.3%",
  "checks_passed": ["static-check", "test", "coverage"],
  "summary": "All quality checks passed"
}
```

---

## Example 7: Text Format Output

### Scenario
Human-readable text output instead of JSON.

### Command
```bash
python3 ~/.claude/skills/programming/scripts/quality_checker.py --format text
```

### Expected Output (success)
```
โœ… All quality checks passed
๐Ÿ“Š Coverage: 87.3%

Next steps:
  โ€ข View detailed coverage: fish -c 'open build/cover.html'
  โ€ข Create commit if ready
```

### Expected Output (failure)
```
โŒ Quality checks failed (3 errors)

๐Ÿ” Linting Errors (2):

  [errcheck] - 1 issues
    โ€ข pkg/api/handler.go:45: Error return value not checked

  [gosec] - 1 issues
    โ€ข pkg/crypto/hash.go:23: Use of weak cryptographic primitive (G401)

๐Ÿงช Test Failures (1):
  โ€ข TestProcessRequest in github.com/your-org/project/pkg/service
    Test failed - check output for details

๐Ÿ’ก Suggested fixes:
  โ€ข fish -c "make goimports"
```

---

## Example 8: Repository Not Valid

### Scenario
Running in non-Go directory.

### Command
```bash
cd /tmp
python3 ~/.claude/skills/programming/scripts/quality_checker.py
```

### Expected Output (JSON to stderr)
```json
{
  "status": "error",
  "error_type": "QualityCheckError",
  "message": "Not a Go repository: go.mod not found in /tmp\nNavigate to a Go repository root directory."
}
```

### Exit Code
2 (validation error)

---

## Example 9: Integration with Claude Code PR Review

### Typical Conversation Flow

**User**: "Review this PR and check quality"

**Claude**: "I'll run the Go PR quality gate to check your code."

```bash
python3 ~/.claude/skills/programming/scripts/quality_checker.py --verbose
```

**Output** (failure scenario):
```
โŒ Quality checks failed (exit code: 2)
๐Ÿ“Š Total errors: 2

๐Ÿ” Linting errors: 2
  โ€ข errcheck: 2 issues

๐Ÿ’ก Suggested fixes:
  โ€ข fish -c "make goimports"
```

**Claude**: "The quality checks found 2 linting errors:

1. **pkg/api/handler.go:45** - Unchecked error return from `resp.Body.Close()`
   - Fix: Add error checking: `if err := resp.Body.Close(); err != nil { ... }`

2. **pkg/service/processor.go:123** - Unchecked error return from `file.Close()`
   - Fix: Add defer with error handling

Would you like me to show you how to fix these issues?"

---

## Common Error Patterns and Fixes

### Pattern 1: Import Issues
**Error**: `File is not 'goimports'-ed`
**Fix**: `fish -c "make goimports"`

### Pattern 2: Dependency Issues
**Error**: `go.mod is out of sync with go.sum`
**Fix**: `fish -c "make tidy-deps"`

### Pattern 3: License Headers
**Error**: `Missing SPDX license header`
**Fix**: `fish -c "make license-headers"`

### Pattern 4: Unchecked Errors
**Error**: `Error return value not checked (errcheck)`
**Fix**: Add error handling:
```go
if err := someFunc(); err != nil {
    // The called function already provides clear context, so preserve it.
    return err
}
```

### Pattern 5: Security Issues
**Error**: `Use of weak cryptographic primitive (gosec)`
**Fix**: Use strong crypto:
```go
// Before
h := md5.New()

// After
h := sha256.New()
```

---

## Advanced Usage

### Check Specific Repository
```bash
cd /path/to/go-project
python3 ~/.claude/skills/programming/scripts/quality_checker.py
```

### Verbose Mode for Debugging
```bash
python3 ~/.claude/skills/programming/scripts/quality_checker.py --verbose
```

### Validate Only (No Checks)
```bash
python3 ~/.claude/skills/programming/scripts/quality_checker.py --validate-only
```

### Enforce Coverage Threshold
```bash
python3 ~/.claude/skills/programming/scripts/quality_checker.py --min-coverage 85.0
```

### Combine Options
```bash
python3 ~/.claude/skills/programming/scripts/quality_checker.py \
  --min-coverage 80.0 \
  --format text \
  --verbose
```

---

## Troubleshooting

### Issue: Script hangs during make check
**Solution**: Check for infinite loops in tests, increase timeout, or run tests individually

### Issue: golangci-lint not found
**Solution**: Install via Homebrew: `fish -c "brew install golangci-lint"`

### Issue: Permission denied
**Solution**: Ensure scripts are executable: `fish -c "chmod +x ~/.claude/skills/programming/scripts/*.py"`

### Issue: Coverage not detected
**Solution**: Verify `make check` includes test coverage, check for `build/cover.out` file
rea-changelog-updatemorluto/reaPrepare or rewrite REA release changelogs and GitHub release notes from pinned Git history, with verified contributor thanks and Release Please synchronization.Stars: 470kUpdated Claude CodeCodexVerifiedInstall
academy-guideanthropics/skillsStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product โ€” it recommends matching courses, tutorials, and use cases from Claude Academy (academy.claude.com), Anthropic's learning hub. Trigger on: "how do I", "how can I", "getting started with", "what can Claude do", "teach me", "learn to use"; questions about artifacts, projects, skills, plugins, connectors, MCP; requests about rolling Claude out to a team, class, or organization; and any ask for training materials, onboarding content, or learning resources. Use it when the user is learning how to use a feature or product โ€” not when they are mid-task and just want the task done. This skill composes with other skills: after consulting product documentation to answer how a Claude feature works, also check here for a matching course or tutorial โ€” a docs-grounded answer and an Academy recommendation belong together. Only recommend on a strong match; never invent Academy content.Stars: 197kUpdated Claude CodeCodexVerifiedInstall
claude-apianthropics/skillsReference for the Claude API / Anthropic SDK โ€” model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER โ€” read BEFORE opening the target file; don't skip because it "looks like a one-liner" โ€” whenever: the prompt names Claude/Anthropic in any form (Claude, Anthropic, Fable, Opus, Sonnet, Haiku, `anthropic`, `@anthropic-ai`, `claude-*`, `us.anthropic.*`, `[1m]`); the user asks about an LLM (pricing/model choice/limits/caching) โ€” never answer from memory; OR the task is LLM-shaped with provider unstated (agent/MCP/tool-definition/multi-agent/RAG/LLM-judge/computer-use; generate/summarize/extract/classify/rewrite/converse over NL; debugging refusals/cutoffs/streaming/tool-calls/tokens). SKIP only when another provider is being worked on (overrides all triggers): OpenAI/GPT/Gemini/Llama/Mistral/Cohere/Ollama named in the query; OR `grep -rE 'openai|langchain_openai|google.generativeai|genai|mistralai|cohere|ollama'` over the project hits (run this grep FIRST if no provider named โ€” don't Read the file).Stars: 197kUpdated Claude CodeCodexUnverifiedInstall
doc-coauthoringanthropics/skillsGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.Stars: 197kUpdated Claude CodeCodexVerifiedInstall