AGENT SKILL

taste-lints

Custom lints with agent-readable remediation instructions. Enforces taste invariants (file size, naming conventions, structured logging, complexity) and surfaces errors that agents can act on directly. Use when writing or reviewing code to catch style violations early.

License 许可
MIT
所属仓库
loriensleafs/brain
最近更新
2026-03-11
Stars
★ 0
Forks
0

01 前言 Front Matter

name
taste-lints
model
claude-sonnet-4-5
agents
[ "qa", "implementer", "analyst" ]
license
MIT
metadata
{ "version": "1.0.0" }
description
Custom lints with agent-readable remediation instructions. Enforces taste invariants (file size, naming conventions, structured logging, complexity) and surfaces errors that agents can act on directly. Use when writing or reviewing code to catch style violations early.

02 资源文件 4

03 SKILL.md 正文

Taste Lints

Custom lints where error messages become agent-readable remediation instructions.

Inspired by OpenAI Harness Engineering:

"We statically enforce structured logging, naming conventions for schemas and types, file size limits, and platform-specific reliability requirements with custom lints. Because the lints are custom, we write the error messages to inject remediation instructions into agent context."

Triggers

Trigger Phrase Operation
run taste lints taste_lints.py on staged or specified files
check file size taste_lints.py with file-size rule only
check naming conventions taste_lints.py with naming rule only
lint taste invariants taste_lints.py full scan
taste lint report taste_lints.py with JSON output

When to Use

Use this skill when:

  • Writing or editing source files (catch taste violations early)
  • Preparing code for PR submission
  • Reviewing code for style and convention compliance
  • Adding new files to the project

Taste Invariants

1. File Size Limits

Files exceeding line thresholds indicate poor cohesion.

Threshold Lines Severity
Warning 301-500 warning
Error 501+ error

2. Naming Conventions

Pattern Rule Applies To
snake_case Python files, functions, variables *.py
kebab-case Skill directories, YAML files .claude/skills/, *.yml
PascalCase PowerShell functions, classes *.ps1, *.psm1
UPPER_CASE Constants, environment variables All languages
invoke_ prefix Hook scripts .claude/hooks/

3. Function Complexity

Functions exceeding cyclomatic complexity 10 need decomposition.

4. Skill Prompt Size

Skills exceeding 500 lines need progressive disclosure refactoring.

Process

  1. Run bun run .claude/skills/taste-lints/scripts/taste_lints.ts with target files
  2. Review AGENT_REMEDIATION blocks in output
  3. Apply suggested fixes
  4. Re-run to confirm compliance

Usage

# Scan staged files
bun run .claude/skills/taste-lints/scripts/taste_lints.ts --git-staged

# Scan specific files
bun run .claude/skills/taste-lints/scripts/taste_lints.ts path/to/file.py

# Scan a directory
bun run .claude/skills/taste-lints/scripts/taste_lints.ts --directory src/

# JSON output
bun run .claude/skills/taste-lints/scripts/taste_lints.ts --format json --git-staged

# Run specific rules only
bun run .claude/skills/taste-lints/scripts/taste_lints.ts --rules file-size,naming

Exit Codes

Code Meaning
0 No violations found
1 Script error (bad arguments, file not found)
10 Violations detected

Suppression

Add a comment to suppress a specific rule on a file:

# taste-lint: ignore file-size

Valid rules: file-size, naming, complexity, skill-size

04 同仓库更多 Skills

loriensleafs
loriensleafs/brain

validation-authority

Treat upstream validators as authoritative. Align local config to them. Use when validation fails unexpectedly, before modifying validator behavior, or when tempted to change upstream tool code.

★ 0
loriensleafs
loriensleafs/brain

using-brain-memory

Guidance for using Brain semantic memory effectively. Applies Zettelkasten atomic note principles with observations and relations. Use when deciding whether to query or create notes, structuring note content, or understanding the semantic knowledge graph.

★ 0
loriensleafs
loriensleafs/brain

threat-modeling

Structured security analysis using OWASP Four-Question Framework and STRIDE methodology. Generates threat matrices with risk ratings, mitigations, and prioritization. Use for attack surface analysis, security architecture review, or when asking what can go wrong.

★ 0
loriensleafs
loriensleafs/brain

style-enforcement

Validate code against style rules from .editorconfig, StyleCop.json, and Directory.Build.props. Detects line ending violations, naming convention issues, indentation problems, and charset mismatches across C#, Python, TypeScript, and JavaScript. Produces JSON reports for pre-commit hooks and CI pipelines.

★ 0
loriensleafs
loriensleafs/brain

steering-matcher

Match file paths against steering file glob patterns to determine applicable steering guidance. Use when orchestrator needs to inject context-aware guidance based on files being modified.

★ 0
loriensleafs
loriensleafs/brain

slashcommandcreator

Autonomous meta-skill for creating high-quality custom slash commands using 5-phase workflow with multi-agent validation and quality gates. Use when user requests new slash command, reusable prompt automation, or wants to convert repetitive workflows into documented commands.

Skill与智能体开发
★ 0