Automated summary
Repository-specific review guidelines for AI agents reviewing the Traefik Proxy Go codebase, prioritizing security, correctness, breaking changes, performance, and maintainability.
Strengths
- Provides a clear priority order and concrete rules tailored to the Traefik codebase (e.g., error wrapping, CRD type duplication).
- Explicitly lists what not to flag, reducing false positives.
- Emphasizes verifying actual usage before making claims that a change is unsafe.
- Covers both Go best practices and domain-specific concerns.
Limitations
- Applies only to the Traefik repository, so it is not general-purpose.
- Depends on the AI reviewer already having core review mechanics — this is additive guidance.
- Static analysis cannot validate Docker-dependent integration fixtures.
Use when an AI agent is asked to review a pull request or changes in the Traefik Proxy repository.
Do not use for reviewing any other codebase or when a general code-review skill is required.
Security analysis
SafeThe skill contains only static code review guidance for a specific repository. It declares no tools, does not instruct execution of commands, access to files, or network operations, and poses no security risk.
No concerns found
How this analysis is madeExamples
Run the review skill on the new middleware implementation in this PR.Use the review skill to audit the authentication logic for security issues.Review the changes: check that any new dynamic config field is mirrored in the CRD types.name: review description: Repository-specific guidance for the AI code review agent reviewing this repo user-invocable: true disable-model-invocation: true
Code review guidance
This is Traefik Proxy (Go), a cloud-native reverse proxy and load balancer. The reviewer already fixes the
role, the tools, the severity definitions, the finding mechanics and the output format; this guidance
is additive and must not restate them. Record findings only with the severities the reviewer
accepts: CRITICAL, IMPORTANT, MINOR, QUESTION.
Review in this priority order, and keep the bar high at every level.
Security
- Validate authentication, authorization and trust boundaries at every boundary crossing.
- Trace untrusted input through to dangerous sinks (exec, SQL, file I/O, template rendering).
- No hardcoded passwords, tokens or API keys; no secrets or sensitive data in logs.
Correctness
- Nil dereferences, race conditions, off-by-one errors, inverted conditions, unhandled edge cases.
- Errors are wrapped with
fmt.Errorfin gerund form, e.g.fmt.Errorf("unmarshalling data: %w", err), and never silently dropped with_. - Resource leaks: unclosed connections, leaked goroutines, contexts not propagated or cancelled.
context.Contextmust be the first argument of every function that accepts one, namedctx.- Do not use
context.Background()in request paths — propagate the context from the caller. - Custom context keys must be unexported struct types (
type myKey struct{}), never bare strings or integers. - Changes must not blur the static/dynamic configuration boundary: static configuration is read at startup only; dynamic configuration is produced by providers at runtime. Code that reads dynamic config at startup, or stores static config in a runtime struct, is a correctness bug.
- New dynamic configuration options must be replicated everywhere the option's structure is duplicated. In particular, a field added to a
pkg/config/dynamictype has a mirror in the Kubernetes CRD types underpkg/provider/kubernetes/crd/traefikio/v1alpha1; the new field must be added there and wired through the CRD-to-dynamic conversion inpkg/provider/kubernetes/crd/kubernetes.go. A dynamic option that is not exposed on the duplicated CRD struct is a bug.
Breaking changes
- Flag breaking changes to exported Go APIs and to CRD schemas under
traefik.io/v1alpha1. - Flag configuration changes that affect existing deployments.
Performance
- Superlinear algorithms where linear suffices, and avoidable allocations or I/O, but only in hot paths where it measurably matters.
Maintainability
- Interfaces: prefer single-method,
-ersuffix, declared at the usage site. - Idiomatic Go: early returns and guard clauses, the standard library (
slices,maps,cmp) over premature abstraction or third-party helpers, grouped import ordering, exported items with a doc comment starting with the item name. - Comments must explain why, not what; the code already says what. Every comment must end with a period.
- Tests: new behaviour needs tests using
testify/assertandtestify/require; userequirefor preconditions that must stop the test,assertfor independent checks. Tests must be table-driven witht.Parallel(). Blackbox testing (package x_test) is preferred. Do not add verbose message arguments toassert/requirecalls — the test name provides the context.
Do not flag
- Generated code: files matching
zz_generated*.go, everything underpkg/provider/kubernetes/crd/generated/, andwebui/static/. - Test mocks: files matching
mock_*.goor*_mock.go. //nolint:directives — they are intentional.- Integration test fixtures under
integration/fixtures/— Docker-dependent behaviour cannot be verified statically. - Patterns already used consistently across the codebase.
Before claiming a change is unsafe, check how the changed functions are used elsewhere in the repository: the call sites decide.
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/code-review-guidance-for-traefik-proxy-mte1lge8/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/code-review-guidance-for-traefik-proxy-mte1lge8' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/code-review-guidance-for-traefik-proxy-mte1lge8/download' --output '.skill-downloads/code-review-guidance-for-traefik-proxy-mte1lge8/SKILL.md.part' && mv '.skill-downloads/code-review-guidance-for-traefik-proxy-mte1lge8/SKILL.md.part' '.skill-downloads/code-review-guidance-for-traefik-proxy-mte1lge8/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/code-review-guidance-for-traefik-proxy-mte1lge8/SKILL.md' && test -s '.skill-downloads/code-review-guidance-for-traefik-proxy-mte1lge8/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/review' && cp -R '.skill-downloads/code-review-guidance-for-traefik-proxy-mte1lge8' '.claude/skills/review'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/code-review-guidance-for-traefik-proxy-mte1lge8'openskills read 'code-review-guidance-for-traefik-proxy-mte1lge8'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/code-review-guidance-for-traefik-proxy-mte1lge8/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
React Hook Form Best Practices
Development
Master React Hook Form: avoid anti-patterns, manage subscriptions, and handle reset, dirty state, and controlled inputs correctly.
Emotion to Mantine Migration
Development
Migrate Emotion styled-components to Mantine components with style props and CSS modules. Use when converting .styled.tsx files or removing @emotion imports.
Scope Creep Detector
Development
Analyzes git diffs against a stated intent to detect scope creep, unrelated files, broad PRs, and oversized changes, then suggests keep, split, or justify actions.