Skip to content

JPeetz/agent-skills / skills/skill-development/skill-lifecycle-foundry

skill-lifecycle-foundry

Verified

Use this skill when mining, authoring, personalizing, or generalizing agent skills.

FileKindSize
CHANGELOG.mdmarkdown595 B
LICENSEother1.1 KB
SKILL.mdskill md7.6 KB
evals/evals.jsonconfig4.0 KB
references/release-checklist.mdmarkdown1.2 KB
references/sources.mdmarkdown464 B
scripts/scan_sessions.pyscript2.6 KB

scripts/scan_sessions.py

View on GitHub
#!/usr/bin/env python3
"""Scan a directory of session/archive files for repeated workflow intents.

A deterministic first-pass miner: walk the given root, read each text file
(.md, .txt, .json, .jsonl, .log, .yaml, .yml), and report how many distinct
files contain each workflow-signal keyword. Use it to shortlist candidate
workflows before drafting a SKILL.md.

Stdlib only. Invoke through the Hermes terminal tool:

    python3 scripts/scan_sessions.py <root_dir> [--min-files 3] [--top 10]

Example:

    python3 scripts/scan_sessions.py ~/.hermes --top 8
"""

from __future__ import annotations

import argparse
import collections
import pathlib
import re

DEFAULT_KEYWORDS = [
    "review",
    "migrate",
    "refactor",
    "summary",
    "report",
    "build",
    "deploy",
    "triage",
    "optimize",
    "backup",
]

TEXT_EXT = {".md", ".txt", ".json", ".jsonl", ".log", ".yaml", ".yml"}


def tokens(text: str) -> set[str]:
    """Return the set of lowercase alphanumeric tokens in a text blob."""
    return set(re.findall(r"[a-z0-9_]+", text.lower()))


def scan(root: pathlib.Path, min_files: int, top: int) -> None:
    if not root.is_dir():
        raise SystemExit(f"not a directory: {root}")

    hits: dict[str, set] = collections.defaultdict(set)
    file_count = 0

    for path in root.rglob("*"):
        if not path.is_file() or path.suffix.lower() not in TEXT_EXT:
            continue
        file_count += 1
        try:
            text = path.read_text(encoding="utf-8", errors="ignore")
        except OSError:
            continue
        found = tokens(text) & set(DEFAULT_KEYWORDS)
        for kw in found:
            hits[kw].add(str(path))

    for kw in DEFAULT_KEYWORDS:
        hits.setdefault(kw, set())  # stable output even when a word is unseen

    print(f"scanned {file_count} files under {root}")
    print(f"{'keyword':<14}{'files':>7}  intent")
    ranked = sorted(hits.items(), key=lambda kv: len(kv[1]), reverse=True)
    for kw, files in ranked[:top]:
        marker = "  *candidate*" if len(files) >= min_files else ""
        print(f"{kw:<14}{len(files):>7}{marker}")


def main() -> None:
    parser = argparse.ArgumentParser(description="session intent scanner")
    parser.add_argument("path", type=pathlib.Path, help="directory to scan")
    parser.add_argument("--min-files", type=int, default=3,
                        help="distinct-file threshold to call a candidate")
    parser.add_argument("--top", type=int, default=10, help="rows to print")
    args = parser.parse_args()
    scan(args.path, args.min_files, args.top)


if __name__ == "__main__":
    main()
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall