agentleFS
TrarothTraroth/claude-dev-framework/skills/static-analysis/SKILL.md

static-analysis

Skill1 starsChanged 7 months agoMITView on GitHub

Perform a structured static analysis of any class in the project. Use this skill after every class generation or significant modification — even if the user doesn't explicitly ask for it. Also trigger when the user says "analyse", "check", "review", "audit", or "is this correct".

12 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use build-keil, can-debug and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • ZhongYechengSkill

    build-keil

    当需要通过 Keil MDK 命令行编译嵌入式工程,调用自带脚本解析工程文件、执行构建并定位固件产物时使用。

    Also in 3 projects that use this

  • ZhongYechengSkill

    can-debug

    当需要调试 CAN 总线通信时使用,支持通过 USB-CAN 适配器监听、发送 CAN 帧和扫描节点。

    Also in 3 projects that use this

  • iPlug2Skill

    build-cmake

    Build an iPlug2 plugin project using CMake with Ninja, Xcode, or Visual Studio generators

    Also in 3 projects that use this

  • +9 more from ZhongYecheng

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 5 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After generating or significantly modifying any class

    line 14
  2. Distinctive:

    When the user asks for a review, audit, or correctness check

    line 15
  3. Distinctive:

    Before marking a backlog task as done

    line 16
  4. Distinctive:

    Run every item below. Report only findings — skip items with no issues.

    line 26
  5. Distinctive:

    If no issues are found in a severity level, skip it entirely.

    line 130

“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Static Analysis

When to run

  • After generating or significantly modifying any class
  • When the user asks for a review, audit, or correctness check
  • Before marking a backlog task as done

Focus especially on mutation methods (put, remove, add, set, clear, rehash, resize), as they are the most common source of structural bugs.


Analysis checklist

Run every item below. Report only findings — skip items with no issues.


1. Critical — bugs, contract violations, broken invariants

Logic and contract violations

  • Logic bugs (off-by-one, wrong condition, unreachable branch)
  • Broken invariants (e.g. size consistency, structural integrity of internal data structures)
  • UnsupportedOperationException thrown silently by an inherited method without being documented
  • Abstract base class contract violations (e.g. entrySet() inconsistent with size(), get(), containsKey())
  • Concurrent modification not handled correctly in synchronized implementations (missing lock, wrong lock type)
  • Resize/rehash leaving entries in an inconsistent state

Structural invariants

  • Class invariants not documented (preferably using formal contracts)
  • Constructor does not establish all invariants
  • Mutation methods break invariants
  • Temporary invariant violations not restored before method exit

2. Major — performance, mutation safety, iterator correctness

Complexity

  • Method expected to be O(1) accidentally iterates the whole structure
  • Method inherited from an abstract base class causing hidden O(n) behaviour
  • Resize or rehash logic breaking amortized complexity guarantees

Mutation consistency

  • All internal structures not updated consistently after mutation
  • size() inconsistent after add/remove operations
  • remove() leaves stale references
  • clear() does not fully reset the structure

Iterator correctness

  • Iterator does not respect the contract of the implemented interface
  • iterator.remove() incorrect or unsupported without documentation
  • Missing ConcurrentModificationException where fail-fast behaviour is expected

Null safety

  • Missing null check where the contract requires it
  • null returned where the contract specifies a non-null return
  • Nullable types used as parameter type or collection element where forbidden by standards

Behavioural consistency

  • Mutation through views or entries not maintaining structural invariants
  • Configuration change not atomic in synchronized implementations
  • Snapshot cost not documented in Javadoc for copy-based operations

3. Minor — style, documentation, guideline compliance

File structure

  • File header missing or malformed
  • Version in file header does not match the build file

Imports / dependencies

  • Wildcard or unused imports present
  • Imports not sorted according to project conventions

Code organisation

  • Declaration order violated
  • Section separators missing or malformed

Documentation

  • Documentation missing on a public class or public method
  • Parameters, return values, or exceptions not documented where applicable
  • Overridden method with different semantics has no documentation

Language

  • Any identifier, comment, documentation, exception message, or log message not in English

Output format

Report findings grouped by severity:

  1. Critical — with file, line, and explanation
  2. Major — with file, line, and explanation
  3. Minor — with file, line, and explanation

If no issues are found in a severity level, skip it entirely.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.