_ctx-qa
Run QA checks before committing. Use after writing code, before commits, or when CI might fail.
Best use case
_ctx-qa is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Run QA checks before committing. Use after writing code, before commits, or when CI might fail.
Teams using _ctx-qa should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/_ctx-qa/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How _ctx-qa Compares
| Feature / Agent | _ctx-qa | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Run QA checks before committing. Use after writing code, before commits, or when CI might fail.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
Run the project's QA pipeline locally to catch issues before
they hit CI.
## Before Running
1. **Check what changed**: run `git diff --name-only` to see
which files were modified; this determines which checks
to run (see "When to Run What" below)
2. **Build first**: `CGO_ENABLED=0 go build -o /dev/null ./cmd/ctx`
to catch compile errors before running the full pipeline
## When to Use
- After writing or modifying Go code
- Before committing (catch issues locally, not in CI)
- When CI failed and you need to reproduce locally
- After dependency changes or refactors
## When NOT to Use
- When only docs, markdown, or config files changed (no Go
code touched)
- When the user explicitly says "skip QA" or "commit without
checks"
- Mid-development when code is intentionally incomplete; wait
until a logical stopping point
## Usage Examples
```text
/_ctx-qa
/_ctx-qa (after refactoring the journal command)
```
## What to Run
Run these checks **in order**; each depends on the previous
passing:
### 1. Format
```bash
gofmt -l .
```
If files are listed, they need formatting. Fix with
`gofmt -w .` and include the formatted files in the commit.
### 2. Vet
```bash
CGO_ENABLED=0 go vet ./...
```
### 3. Lint
```bash
golangci-lint run --timeout=5m
```
### 4. Test
```bash
CGO_ENABLED=0 CTX_SKIP_PATH_CHECK=1 go test ./...
```
### 5. Smoke (if CLI behavior changed)
```bash
make smoke
```
Builds the binary and exercises `ctx init`, `ctx status`,
`ctx agent`, `ctx drift`, `ctx add task`, and
`ctx journal source` in a temporary directory.
## Shortcut
`make audit` runs steps 1-4 in sequence. Use it when you
want a single pass/fail answer.
## When to Run What
| Changed | Minimum Check |
|------------------------|------------------------------|
| Any `.go` file | `make audit` |
| CLI command behavior | `make audit` + `make smoke` |
| Only docs/config | Nothing |
| Template files changed | `go build` (embed must work) |
## On Failure
When a check fails, **reason through the error before fixing**:
read the output, trace the cause, then fix. Do not blindly
retry or apply the first fix that comes to mind.
## Common Failures
| Failure | Fix |
|------------------------------------------|---------------------------------------------|
| `gofmt -l` lists files | `gofmt -w .` |
| `fmt.Printf` in CLI code | Use `cmd.Printf` (enforced by AST test) |
| golangci-lint unused variable | Remove it; do not rename to `_` |
| Test needs `CTX_SKIP_PATH_CHECK` | Already set in `make test` and `make audit` |
| Coverage below 70% on `internal/context` | Add tests; check with `make test-coverage` |
## Output Format
After running checks, report:
1. **Result**: pass or fail
2. **Failures**: what failed and how to fix (if any)
3. **Files touched**: list of files that were auto-formatted
## Quality Checklist
Before reporting QA results, verify:
- [ ] Ran the appropriate checks for what changed (not more,
not fewer)
- [ ] Fixed auto-fixable issues (gofmt) rather than just
reporting them
- [ ] All failures have a clear fix action (not just "it
failed")
- [ ] If smoke tests were needed (CLI behavior changed),
they were runRelated Skills
ctx-verify
Verify before claiming completion. Use before saying work is done, tests pass, or builds succeed.
ctx-skill-creator
Create, improve, test, and deploy skills. Full skill lifecycle from intent to working skill file.
ctx-sanitize-permissions
Audit tool permissions for dangerous or overly broad entries. Use to ensure safe agent configuration.
ctx-recall
Browse session history. Use when referencing past discussions or finding context from previous work.
ctx-prompt
Apply, list, and manage saved prompt templates from .context/prompts/. Use when the user asks to apply, list, or create a reusable template like code-review or refactor.
ctx-journal-normalize
Normalize journal source markdown for clean rendering. Use after journal site shows rendering issues: fence nesting, metadata formatting, broken lists.
ctx-import-plans
Import plan files into project specs directory. Use to convert external plans into project-tracked specs.
ctx-compact
Archive completed tasks and trim context. Use when context files are growing large.
ctx-check-links
Audit docs for dead links. Use before releases, after restructuring docs, or when running a documentation audit.
ctx-add-task
Add a task. Use when follow-up work is identified or when breaking down complex work into subtasks.
ctx-add-learning
Record a learning. Use when discovering gotchas, bugs, or unexpected behavior that future sessions should know about.
ctx-add-decision
Record architectural decision. Use when a trade-off is resolved or a non-obvious design choice is made that future sessions need to know.