.claude/skills/add-rule/SKILL.md
# Add Rule Skill This skill helps you add new rules to the attgo-linter project. ## Usage When asked to add a new linter rule, follow these steps: ### 1. Gather Information Ask the user for: - **Rule name**: e.g., "no-global-vars" - **Description**: What the rule checks - **Priority**: HIGH (enabled by default), MEDIUM, or LOW (disabled by default) - **Bad example**: Code that should trigger the warning - **Good example**: Code that passes the check - **Configuration options**: Any customiz
npx skillsauth add attestantio/attgo-linter .claude/skills/add-ruleInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill helps you add new rules to the attgo-linter project.
When asked to add a new linter rule, follow these steps:
Ask the user for:
Create the following files:
analyzers/{rulename}/
├── analyzer.go
└── analyzer_test.go
The analyzer name must use underscores (not hyphens): attgo_{rule_name}
analyzers/{rulename}/testdata/src/{rulename}/
└── {rulename}.go
Use // want \regex pattern`` comments for expected diagnostics.
Update plugin.go:
BuildAnalyzers() with config checkUpdate config.go:
Enable{RuleName} field to Config structDefaultConfig()Update plugin.go config handling:
New()README.mddocs/rules/attgo-{rule-name}.mdCHANGELOG.mdRun tests:
go test ./...
// Copyright © 2026 Attestant Limited.
// Licensed under the Apache License, Version 2.0 (the "License");
// ...
// Package {rulename} provides an analyzer that {description}.
package {rulename}
import (
"golang.org/x/tools/go/analysis"
)
const (
analyzerName = "attgo_{rule_name}"
doc = `{short description}
{detailed explanation}
Bad:
{bad example}
Good:
{good example}`
)
// Analyzer is the {description} analyzer.
var Analyzer = &analysis.Analyzer{
Name: analyzerName,
Doc: doc,
Run: run,
}
func run(pass *analysis.Pass) (any, error) {
for _, file := range pass.Files {
// Implementation
}
return nil, nil
}
// Copyright © 2025 Attestant Limited.
// ...
package {rulename}_test
import (
"testing"
"github.com/attestantio/attgo-linter/analyzers/{rulename}"
"golang.org/x/tools/go/analysis/analysistest"
)
func TestAnalyzer(t *testing.T) {
testdata := analysistest.TestData()
analysistest.Run(t, testdata, {rulename}.Analyzer, "{rulename}")
}
// Copyright © 2025 Attestant Limited.
// ...
package {rulename}
// Bad case.
var bad = something // want `expected error`
// Good case.
var good = something // No warning
analyzers/{rulename}/analyzer.goanalyzers/{rulename}/analyzer_test.goanalyzers/{rulename}/testdata/src/{rulename}/{rulename}.goplugin.goBuildAnalyzers() in plugin.goconfig.goDefaultConfig()New()go test ./...README.mdCHANGELOG.mddevelopment
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.
development
Run, watch, debug, and extend OpenClaw QA testing with qa-lab and qa-channel. Use when Codex needs to execute the repo-backed QA suite, inspect live QA artifacts, debug failing scenarios, add new QA scenarios, or explain the OpenClaw QA workflow. Prefer the live OpenAI lane with regular openai/gpt-5.4 in fast mode; do not use gpt-5.4-pro or gpt-5.4-mini unless the user explicitly overrides that policy.
development
End-to-end Parallels smoke, upgrade, and rerun workflow for OpenClaw across macOS, Windows, and Linux guests. Use when Codex needs to run, rerun, debug, or interpret VM-based install, onboarding, gateway smoke tests, latest-release-to-main upgrade checks, fresh snapshot retests, or optional Discord roundtrip verification under Parallels.