Generated banner for Agent Skill Stack
Generated logo for Agent Skill Stack

Agent Skill Stack

GitHubOfficialFirst committed by neilchen2000-pixelDistributed by GitHub

  • Skill
  • Meta (authoring, orchestration, planning, memory)
  • Agent tooling
  • MIT
  • Low risk
  • Has scripts

From the author

Find, evaluate, and assemble the smallest compatible set of AI Agent Skills for an end-to-end natural-language goal. Use when a user wants Skills for a multi-step workflow, asks which Skills fit a project, needs an installed-Skill audit or conflict check, has low Skill recall, wants indirect helpers such as humanizers or compliance checks, or wants a project-specific Skill Stack with controlled installation. Search local Skills, registries, GitHub, and OpenCLI; compare adoption, verified fit, safety, and overlap. Do not use for locating one known or common Skill; use the generic find-skills workflow.
— the description by neilchen2000-pixel

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

The agent-skill-stack skill provides a structured methodology for identifying and organizing the optimal set of AI agent skills required to complete a multi-step project. It emphasizes a user-centric approach, translating complex technical requirements into plain-language recommendations while ensuring safety, compatibility, and minimal redundancy. By searching local indices, registries, and repositories, it evaluates candidates based on verified capabilities, community adoption, and security, ultimately helping users build a project-specific skill stack with controlled installation.

What it does

  • Decomposes complex user goals into a logical, multi-step workflow.
  • Searches local indices, registries, and GitHub for relevant agent skills.
  • Evaluates candidate skills based on safety, adoption, and functional fit.
  • Identifies and resolves potential conflicts between overlapping skills.
  • Presents recommendations in clear, non-technical language for user approval.
  • Manages project-specific skill stacks to ensure controlled and secure installations.

When to use it

  • When you need to assemble a set of skills for a complex, multi-step task.
  • When you want to audit your currently installed skills for conflicts or redundancies.
  • When you need to find the best-fit skills for a project while ensuring safety and reliability.
  • When you require indirect helpers, such as compliance or quality-assurance tools, for your workflow.

Advantages

  • Ensures the smallest, most efficient stack is used for any given goal.
  • Prioritizes security and safety through rigorous verification gates.
  • Reduces technical friction by presenting information in plain language.
  • Prevents skill bloat by managing project-specific profiles.
  • Provides a clear, reproducible process for skill discovery and installation.

Usage examples

“I need to build a research report on renewable energy. Which skills should I use?”
The agent will decompose the research process, search for relevant data-gathering and writing skills, and recommend a stack that includes the necessary research and content-generation tools.
“Check my current skill stack for conflicts and suggest improvements.”
The agent will audit your installed skills, identify any overlapping or redundant capabilities, and propose a refined stack that optimizes performance and reduces potential conflicts.

Install

  1. Download the skill as a ZIP:

    https://autogineer.com/agent-skills/github/agent-skill-stack/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip agent-skill-stack.zip -d .agents/skills

Documentation by neilchen2000-pixel

Build an Agent Skill Stack

Build the smallest useful stack for the user's actual outcome. Never force a domain example or a fixed lifecycle onto a different request.

1. Choose the user-facing depth

Default to plain-language mode. Assume the user does not need to understand paths, revisions, hashes, manifests, static analysis, or runtime details.

In plain-language mode, show:

  • what the user is trying to accomplish;

  • the steps in everyday language;

  • which capabilities are already available;

  • which Skills are recommended, optional, overlapping, or unsuitable;

  • how widely each candidate is used;

  • whether it passed an installation safety check and a safe trial;

  • what account access or external actions it may require.

Keep source paths, revisions, file fingerprints, raw scores, audit evidence, and dependency details in the internal record. Show them only when the user asks for technical details or when a specific technical fact is necessary for informed consent.

2. Derive the workflow dynamically

Read references/workflow-model.md. Begin with the final result the user wants, not the domain words in the request.

Ask only questions whose answers materially change the result, access boundary, cost, or stack. Derive the workflow backward from success, then validate it forward from the available starting point.

Do not reuse a previous numbered flow. Do not assume that every request needs research, content creation, publishing, analytics, storage, or automation. Add a step only when the user's outcome requires it.

Stop decomposing when a step has one understandable action, one main result, one access boundary, and one observable success condition. Keep the technical capability cards internal; show the user a short plain-language flow.

3. Search the local index first

Read references/local-index-and-profiles.md.

If a current local Skill index exists, search it before the filesystem or internet. If it is missing or stale, rebuild it from the relevant Skill roots:

python3 scripts/skill_index.py build \
  --root ~/.codex/skills \
  --root ~/.codex/plugins/cache \
  --root .codex/skills \
  --root ~/.agents/skills \
  --root ~/.hermes/skills \
  --output ~/.codex/skill-index.json

The index stores names, summaries, aliases, scope, capability terms, update time, and internal file fingerprints. It never executes a Skill and stores no usage history.

If the current project has .codex/skill-stack.json, treat its active Skills and routing rules as the first-choice stack. Search outside the profile only for an uncovered capability or when the user asks for alternatives. Treat same-name entries from different local roots as a review item; do not silently merge them.

4. Map capabilities, including indirect helpers

For every necessary step, record internally:

  • required input, action, and output;

  • constraints, frequency, and scale;

  • local/read-external/write-external boundary;

  • account, permission, and approval needs;

  • success condition and fallback;

  • predecessor and successor steps.

Then consider cross-cutting needs only where relevant: quality/style, accuracy, compliance, privacy, localization, data quality, orchestration, and observability.

Match Skills by input -> operation -> output, not by title similarity. This allows a Humanizer to match a natural-writing requirement even when the user's domain never appears in its name.

Do not force one Skill per step. A Skill may cover several steps; a step may need a tool, MCP, connector, or general agent capability rather than another Skill.

5. Search with four lenses

Read references/discovery-ranking.md. Search each uncovered capability through:

  1. Direct need: the user's domain and action.

  2. Underlying operation: the actual transformation or data task.

  3. Supporting outcome: quality, safety, style, compliance, evaluation, and monitoring.

  4. Connection method: CLI, MCP, API, connector, browser automation, storage, and handoff.

Expand Chinese/English aliases, verbs, nouns, outputs, and adjacent terminology. Search titles, descriptions, headings, and full SKILL.md content when possible.

Use multiple sources because no registry is complete:

  • the local Skill index and installed inventory;

  • GitHub connector or GitHub file/repository search;

  • npx skills find <query> and skills.sh;

  • agentskill.sh or another registry when available;

  • OpenCLI for broad web discovery and platform-specific research.

Run browser-backed OpenCLI searches sequentially. Do not log in, add credentials, or enable a connector without user approval.

6. Verify and rank candidates

Treat every search hit as a candidate, not a recommendation. Identify the canonical repository and exact Skill path. Read the full Skill and every executable file that installation would make reachable.

Reject or quarantine a candidate when:

  • its source or claimed capability cannot be verified;

  • its structure cannot be installed;

  • mandatory dependencies are incompatible or unavailable;

  • critical credential access, data upload, prompt injection, destructive action, or obfuscation remains unexplained;

  • its only possible test would publish, send, purchase, delete, or change a real account;

  • license or platform terms make the intended use materially uncertain.

Rank candidates that pass these gates with the rubric in references/discovery-ranking.md. Real-world adoption and community evidence account for 25% of the score. Preserve unknown values as unknown.

Prefer the smallest stack that meets all required success conditions. Classify candidates as:

  • Required: needed to complete the outcome.

  • Helpful: improves quality, safety, or efficiency.

  • Alternative: mutually exclusive substitute.

  • Not recommended: blocked, redundant, incompatible, or too uncertain.

7. Analyze conflicts and scope

Read references/security-installation.md. Check identity, activation, instruction, resource, dependency, data-format, permission, and compliance conflicts.

Resolve overlap by selecting one primary Skill, defining a narrow handoff to helpers, keeping alternatives mutually exclusive, or not installing the redundant candidate.

Prefer project-local Skills and a project Skill Stack Profile for task-specific capabilities. Use global installation only for capabilities that should be available broadly.

8. Present recommendations in plain language

Default output:

  1. What you want to achieve: one short restatement.

  2. How the work breaks down: a short numbered flow derived for this request.

  3. What you already have: existing useful Skills and uncovered gaps.

  4. Recommended combination: Required, Helpful, Alternative, and Not recommended.

  5. Why these were chosen: fit, adoption, safety check, safe trial, and conflicts in everyday language.

  6. What needs your decision: account access, paid services, external publishing, or installation selection.

Use labels such as 已具备, 推荐, 可选, 不建议, 安全检查通过, 安全试跑通过, and 最近确认可用. Do not show a hash or local path in the default response.

Offer 查看技术详情 when useful. The technical view may include canonical source, revision, file fingerprint, exact destination, raw evidence, dependencies, permissions, and rollback details.

When the user wants a reusable artifact, create a shareable recommendation card from structured JSON:

python3 scripts/render_stack_card.py \
  --input /path/to/stack-card.json \
  --output /path/to/stack-card.svg

Keep the card understandable without technical paths or raw hashes. Include the goal, selected Skills, each role and status, safety boundary, and verification date.

Recommendation does not authorize installation. Follow references/security-installation.md after the user chooses.

Default to staged installation. Allow a one-click batch only when every selected Skill passed the hard gates, has an exact pinned identity, has no unresolved conflict, will not overwrite an existing destination, and the user explicitly approves the batch.

For already downloaded and checked Skill directories, preview first:

python3 scripts/stage_install.py \
  --source /path/to/skill-a \
  --dest ~/.codex/skills \
  --manifest ./skill-stack-lock.json

Repeat with --apply only after approval. Never silently add credentials, accept new permissions, overwrite an installed Skill, or publish/send/delete external data.

After the user selects the stack, offer to create a project profile in dry-run mode:

python3 scripts/project_profile.py \
  --project /path/to/project \
  --name project-stack \
  --skill skill-a \
  --skill skill-b

Use --apply only after the user confirms the profile.

10. Run a recall check

After installation or profile changes, run a recall check, not a performance benchmark:

  1. a direct request that names the task;

  2. a natural paraphrase that uses different words;

  3. a supporting request that should bring in a helper such as writing quality, fact checking, or compliance.

Confirm that the correct primary and supporting Skills are selected and unrelated Skills stay out. Report a simple result such as 3/3 种说法都能正确识别; keep raw prompts and routing details in the technical view.

Do not collect or store user prompt history, hit/miss logs, or routing feedback.

Files

scripts/skill_index.py

#!/usr/bin/env python3
"""Build and search a local, read-only index of installed agent Skills."""

from __future__ import annotations

import argparse
import hashlib
import json
import os
import re
import tempfile
from datetime import datetime, timezone
from pathlib import Path

from inventory_skills import iter_skill_files, parse_frontmatter, tokenize


QUERY_EXPANSIONS = [
    (
        ("技能组合", "技能栈", "技能包", "配齐", "skill stack", "一套skills", "一套 skills"),
        "agent-skill-stack build curate skill stack capability workflow project profile local index compare conflicts install 组合 技能栈 能力 工作流 项目",
    ),
    (
        ("找一个", "找个", "找一款", "find a skill", "有没有skill", "有没有 skill", "有没有能"),
        "find-skills find skills discover install common capability 查找 单个 技能",
    ),
    (
        ("去ai", "ai味", "humanize", "natural writing", "文风", "自然一点"),
        "humanizer humanize writing rewrite natural style tone voice 文案 改写 自然 文风",
    ),
    (
        ("事实核查", "fact check", "引用", "citation", "可信"),
        "fact check verify evidence citation grounded accuracy 核查 引用 证据 准确",
    ),
    (
        ("合规", "compliance", "版权", "copyright", "规则"),
        "compliance policy copyright legal safety audit 合规 版权 规则 审核",
    ),
    (
        ("调研", "research", "对标", "竞品", "搜集"),
        "research search collect compare benchmark competitor evidence 调研 搜索 收集 对标 竞品",
    ),
    (
        ("发布", "publish", "定时", "schedule"),
        "publish schedule post upload automation approval 发布 定时 上传 自动化 审批",
    ),
    (
        ("整理", "入库", "知识库", "organize", "knowledge base"),
        "organize knowledge base notes database deduplicate structure 整理 入库 知识库 去重 结构化",
    ),
]


def utc_iso(timestamp: float | None = None) -> str:
    moment = datetime.fromtimestamp(timestamp, tz=timezone.utc) if timestamp is not None else datetime.now(timezone.utc)
    return moment.isoformat()


def sha256_file(path: Path) -> str:
    digest = hashlib.sha256()
    with path.open("rb") as handle:
        for chunk in iter(lambda: handle.read(1024 * 1024), b""):
            digest.update(chunk)
    return digest.hexdigest()


def atomic_write_json(path: Path, payload: dict[str, object]) -> None:
    path.parent.mkdir(parents=True, exist_ok=True)
    with tempfile.NamedTemporaryFile("w", encoding="utf-8", dir=path.parent, delete=False) as handle:
        json.dump(payload, handle, ensure_ascii=False, indent=2)
        handle.write("\n")
        temporary = handle.name
    os.replace(temporary, path)


def infer_scope(skill_file: Path, project_root: Path | None) -> str:
    if project_root is not None:
        try:
            skill_file.relative_to(project_root)
            return "project"
        except ValueError:
            pass
    return "global"


def build_record(skill_file: Path, root: Path, project_root: Path | None) -> dict[str, object]:
    text = skill_file.read_text(encoding="utf-8", errors="replace")
    metadata, issues = parse_frontmatter(text[:300_000])
    name = metadata.get("name", "")
    description = metadata.get("description", "")
    headings = [
        re.sub(r"\s+#+$", "", heading).strip()
        for heading in re.findall(r"^#{1,3}\s+(.+)$", text, flags=re.MULTILINE)
    ][:40]
    capability_terms = sorted(tokenize(" ".join([name, description, *headings])))
    if name and skill_file.parent.name != name:
        issues.append(f"directory name '{skill_file.parent.name}' differs from skill name '{name}'")
    fingerprint = sha256_file(skill_file)
    summary = re.sub(r"\s+", " ", description).strip()
    if len(summary) > 360:
        summary = summary[:357].rstrip() + "..."
    return {
        "id": f"{name or 'invalid'}:{fingerprint[:12]}",
        "name": name,
        "display_name": name.replace("-", " ").strip().title() if name else "Invalid Skill",
        "summary": summary,
        "scope": infer_scope(skill_file, project_root),
        "aliases": capability_terms[:80],
        "capability_terms": capability_terms,
        "headings": headings,
        "last_local_change": utc_iso(skill_file.stat().st_mtime),
        "issues": issues,
        "technical": {
            "source_root": str(root),
            "path": str(skill_file.parent),
            "skill_file_fingerprint": fingerprint,
        },
    }


def build_index(args: argparse.Namespace) -> int:
    project_root = Path(args.project_root).expanduser().resolve() if args.project_root else None
    roots: list[Path] = []
    missing: list[str] = []
    for raw in args.root:
        root = Path(os.path.expandvars(os.path.expanduser(raw))).resolve()
        if root.is_dir():
            roots.append(root)
        else:
            missing.append(str(root))

    records: list[dict[str, object]] = []
    seen: set[Path] = set()
    for root in roots:
        for skill_file in iter_skill_files(root):
            resolved = skill_file.resolve()
            if resolved in seen:
                continue
            seen.add(resolved)
            records.append(build_record(skill_file, root, project_root))
    records.sort(key=lambda item: (str(item.get("name", "")), str(item["technical"]["path"])))

    names: dict[str, list[str]] = {}
    for record in records:
        if record["name"]:
            names.setdefault(str(record["name"]), []).append(str(record["id"]))
    duplicates = {name: ids for name, ids in sorted(names.items()) if len(ids) > 1}

    output = Path(os.path.expandvars(os.path.expanduser(args.output))).resolve()
    payload: dict[str, object] = {
        "schema": 1,
        "generated_at": utc_iso(),
        "roots": [str(root) for root in roots],
        "missing_roots": missing,
        "skills": records,
        "duplicates": duplicates,
        "privacy": "This index stores Skill metadata only. It contains no prompts, usage history, or routing feedback.",
    }
    atomic_write_json(output, payload)
    print(json.dumps({
        "status": "built",
        "output": str(output),
        "skills_indexed": len(records),
        "duplicate_names": len(duplicates),
        "missing_roots": missing,
    }, ensure_ascii=False, indent=2))
    return 0


def expanded_query(query: str) -> str:
    lower = query.lower()
    additions = [terms for triggers, terms in QUERY_EXPANSIONS if any(trigger in lower for trigger in triggers)]
    return " ".join([query, *additions])


def score_record(
    record: dict[str, object],
    query: str,
    direct_tokens: set[str],
    expanded_tokens: set[str],
) -> tuple[float, list[str]]:
    name = str(record.get("name", "")).lower()
    summary = str(record.get("summary", "")).lower()
    aliases = set(str(item) for item in record.get("aliases", []))
    capability_terms = set(str(item) for item in record.get("capability_terms", []))
    lower_query = query.lower().strip()
    record_tokens = aliases | capability_terms
    direct_matched = sorted(direct_tokens & record_tokens)
    helper_matched = sorted((expanded_tokens - direct_tokens) & record_tokens)
    matched = [*direct_matched, *helper_matched]

    # What the user actually said must outrank generic query-expansion terms.
    score = float(len(direct_matched) * 4 + len(helper_matched))
    if lower_query and lower_query == name:
        score += 20
    elif lower_query and lower_query in name:
        score += 10
    if lower_query and lower_query in summary:
        score += 8
    if name and name in direct_tokens:
        score += 18
    elif name and name in expanded_tokens:
        score += 14
    if direct_tokens:
        score += 10 * len(direct_matched) / len(direct_tokens)
    if score > 0 and record.get("scope") == "project":
        score += 1
    if record.get("issues"):
        score -= 2
    return score, matched


def search_index(args: argparse.Namespace) -> int:
    index_path = Path(os.path.expandvars(os.path.expanduser(args.index))).resolve()
    payload = json.loads(index_path.read_text(encoding="utf-8"))
    expanded = expanded_query(args.query)
    direct_tokens = tokenize(args.query)
    expanded_tokens = tokenize(expanded)
    results: list[dict[str, object]] = []
    for record in payload.get("skills", []):
        score, matched = score_record(record, args.query, direct_tokens, expanded_tokens)
        if score <= 0:
            continue
        results.append({
            "name": record.get("name"),
            "display_name": record.get("display_name"),
            "summary": record.get("summary"),
            "scope": record.get("scope"),
            "score": round(score, 3),
            "matched_terms": matched[:20],
            "issues": record.get("issues", []),
            "technical": record.get("technical", {}),
        })
    results.sort(key=lambda item: (-float(item["score"]), str(item["name"])))
    results = results[:args.limit]

    if args.format == "simple":
        for position, result in enumerate(results, start=1):
            scope = "项目内" if result["scope"] == "project" else "全局"
            print(f"{position}. {result['display_name']}({scope})— {result['summary']}")
    else:
        print(json.dumps({
            "query": args.query,
            "expanded_query": expanded,
            "results": results,
            "notice": "Search scores are retrieval hints, not quality or installation scores.",
        }, ensure_ascii=False, indent=2))
    return 0


def main() -> int:
    parser = argparse.ArgumentParser(description=__doc__)
    subparsers = parser.add_subparsers(dest="command", required=True)

    build = subparsers.add_parser("build", help="Build or refresh a local Skill index")
    build.add_argument("--root", action="append", required=True, help="Skill root; repeatable")
    build.add_argument("--output", required=True, help="Index JSON output path")
    build.add_argument("--project-root", help="Optional project root used to mark project-scoped Skills")
    build.set_defaults(handler=build_index)

    search = subparsers.add_parser("search", help="Search a previously built local Skill index")
    search.add_argument("--index", required=True, help="Index JSON path")
    search.add_argument("--query", required=True, help="Natural-language capability query")
    search.add_argument("--limit", type=int, default=10)
    search.add_argument("--format", choices=("json", "simple"), default="json")
    search.set_defaults(handler=search_index)

    args = parser.parse_args()
    return int(args.handler(args))


if __name__ == "__main__":
    raise SystemExit(main())

Requirements and compatibility

Written for: GitHub Copilot

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs Python, Needs Node.js

Security

What our scanner noticed· Low risk

  • Scripts that your agent may run

This skill includes scripts that your agent may run. Read them before you use it.

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

First committed by
GitHub avatar of neilchen2000-pixelneilchen2000-pixel
Publisher
GitHub (Official)
Distributed by
GitHub
Source
github/awesome-copilot · skills/agent-skill-stack · commit 797337f
Licence
MIT License (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced
Contributors
neilchen2000-pixel

AutoGineer is not affiliated with or endorsed by neilchen2000-pixel or GitHub.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download agent-skill-stack.zip