Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

discover-important-function

БесплатноБез исполняемых скриптовНе проверен

When given a project codebase, this skill observes the important functions in the codebase for future action.

benchflow-aiот benchflow-ai★ 1 941 звезда на GitHub

Об этом скилле

Fuzz Target Localizer

Purpose

This skill helps an agent quickly narrow a Python repository down to a small set of high-value fuzz targets. It produces:

  • A ranked list of important files
  • A ranked list of important functions and methods
  • A summary of existing unit tests and inferred oracles
  • A final shortlist of functions-under-test (FUTs) for fuzzing, each with a structured "note to self" for follow-up actions

When to use

Use this skill when the user asks to:

  • Find the best functions to fuzz in a Python package/library
  • Identify parsers, decoders, validators, or boundary code that is fuzz-worthy
  • Decide what to fuzz based on existing test coverage and API surface
  • Produce a structured shortlist of fuzz targets with harness guidance
  • Automating testing pipeline setup for a new or existing Python project.

Do not use this skill when the user primarily wants to fix a specific bug, refactor code, or implement a harness immediately (unless they explicitly ask for target selection first).

Inputs expected from the environment

The agent should assume access to:

  • Repository filesystem
  • Ability to read files
  • Ability to run local commands (optional but recommended)

Preferred repository listing command:

  • Use tree to get a fast, high-signal view of repository structure (limit depth if needed).

If tree is not available, fall back to a recursive listing via other standard shell tooling.

Outputs

Produce result:

A report in any format with the following information: - Localize important files - Localize important functions - Summarize existing unit tests - Decide function under test for fuzzing This file should be placed in the root of the repository as APIs.txt, which servers as the guidelines for future fuzzing harness implementation.

Guardrails

  • Prefer analysis and reporting over code changes.
  • Do not modify source code unless the user explicitly requests changes.
  • If running commands could be disruptive, default to read-only analysis.
  • Avoid assumptions about runtime behavior; base conclusions on code and tests.
  • Explicitly consider existing tests in the repo when selecting targets and deciding harness shape.
  • Keep the final FUT shortlist small (typically 1–5).

Localize important files

Goal

Produce a ranked list of files that are most likely to contain fuzz-worthy logic: parsing, decoding, deserialization, validation, protocol handling, file/network boundaries, or native bindings.

Procedure

  1. Build a repository map

    • Start with a repository overview using tree to identify:
      • Root packages and layouts (src/ layout vs flat layout)
      • Test directories and configs
      • Bindings/native directories
      • Examples, docs, and tooling directories
    • Identify packaging and metadata files such as:
      • pyproject.toml
      • setup.cfg
      • setup.py
    • Identify test configuration and entry points:
      • tests/
      • conftest.py
      • pytest.ini
      • tox.ini
      • noxfile.py
  2. Exclude low-value areas

    • Skip: virtual environments, build outputs, vendored code, documentation-only directories, examples-only directories, generated files.
  3. Score files using explainable heuristics Assign a file a higher score when it matches more of these indicators:

    • Public API exposure: init.py re-exports, all, api modules
    • Input boundary keywords in file path or symbols: parse, load, dump, decode, encode, deserialize, serialize, validate, normalize, schema, protocol, message
    • Format handlers: json, yaml, xml, csv, toml, protobuf, msgpack, pickle
    • Regex-heavy or templating-heavy code
    • Native boundaries: ctypes, cffi, cython, extension modules, bindings
    • Central modules: high import fan-in across the package
    • Test adjacency: directly imported or heavily referenced by tests
  4. Rank and select

    • Produce a Top-N list (default 10–30) with a short rationale per file.

Output format

For each file:

  • path
  • score (relative, not necessarily normalized)
  • rationale (2–5 bullets)
  • indicators_hit (list)

Localize important functions

Goal

From the important files, identify and rank functions or methods that are strong fuzz targets while minimizing full-body reading until needed.

Approach 1: AST-based header and docstring scan

For each localized Python file, parse it using Python’s ast module and extract only:

  • Module docstring
  • Function and async function headers (name, args, defaults, annotations, decorators)
  • Class headers and method headers
  • Docstrings for modules, classes, and functions/methods

Do not read full function bodies during the initial pass unless needed for disambiguation or final selection.

Procedure

  1. Build per-file declarations via AST
    • Parse the file with ast
    • Enumerate:
      • Top-level functions
      • Classes and their methods
      • Nested functions only if they are likely to be di
Полный SKILL.md на GitHub

Установить discover-important-function в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл discover-important-function?

When given a project codebase, this skill observes the important functions in the codebase for future action.

Как установить скилл discover-important-function?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл discover-important-function запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить discover-important-function с