Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计通过

modspecmodspec 搜索

Agent Skill

modspec 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

220

周安装

9

GitHub Stars

公开资料未说明

下载量

71
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:modspec(modspec 搜索)
来源仓库:https://github.com/moejay/modspec
仓库路径:skills/modspec
安装命令:
npx skills add https://github.com/moejay/modspec --skill modspec
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/moejay/modspec --skill modspec

简介

用于查找、检索和筛选相关信息,支持关键词和任务场景定位。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中快速获取候选结果。
  • 可结合来源仓库和原始 README 继续核验具体用法。
  • 安装前建议确认权限范围和维护状态,避免触发联网或命令执行。
  • modspec 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

modspec — Spec-Driven Development Workflow

This skill defines the complete workflow for working in a modspec project: authoring specs, editing them, and implementing code. modspec uses markdown spec files with YAML frontmatter to define modules, their dependencies, and links to Gherkin .feature files. The features are the executable contract for the implementation.

The contract — MUST ALWAYS

When this skill is loaded, every code change in the project follows the same flow, no exceptions:

  1. Phase 1 — Update the spec and features first. If the requested change isn't already covered by an existing scenario, the spec or .feature file gets edited *before* any source code is touched.
  2. Phase 2 — Red/green TDD against the feature suite. New or modified scenarios must fail first, then implementation makes them pass, then the full feature suite is run to check for regressions.

This is strict on purpose. Specs are an investment in regeneration: detailed, current specs let the same behavior be reproduced repeatedly from the spec alone. Skipping Phase 1 lets the source of truth drift; skipping Phase 2 lets the implementation diverge from the spec. Either break breaks the regeneration property.

If the user requests a code change that isn't covered by an existing scenario — even a "small" one — stop and update the spec/feature first. Do not negotiate the workflow down to "just do this one quickly." The user invested in this workflow specifically to keep specs load-bearing.

Test runner contract

modspec does not prescribe a runner — the choice (cucumber, vitest-cucumber, jest-cucumber, behave, custom, etc.) and the wiring (where step defs live, file extensions, discovery mechanism) are decided per project. What is non-negotiable is the contract the runner must uphold:

  • The runner MUST treat the project's features/ directory as its source of truth — every .feature file is part of the executable contract.
  • A scenario with no matching step definition is red (pending or failing — the agent's signal to write the stub and the implementation).
  • Tests that assert behavior not described in any .feature file are forbidden — that signal is "go to Phase 1 and add a scenario," not "skip the spec."
  • src/ code that contradicts a passing scenario is the bug, not the scenario.

When entering a project, read its package.json / test config to learn how the project wired its runner. Match that convention; do not impose a different one.

Project structure

The shape below is illustrative. spec/, features/, and src/ are conventional; the rest (test entry, step definition layout) is per-project.

project/
├── spec/                       # Spec markdown files (one per module)
│   ├── auth.md
│   └── persistence.md
├── features/                   # Gherkin .feature files (one subdir per spec)
│   ├── auth/
│   │   └── user-login.feature
│   └── persistence/
│       └── data-storage.feature
├── src/                        # Implementation (one module per spec)
└── test/                       # Runner-specific — see project's test config

Phase 1 — Update the spec and features

Use this phase when the user asks to add, change, or remove behavior.

1.1 Understand the request

  • *What* is being added/changed/removed? (spec, feature, scenario, dependency)
  • *Which module* owns it? If unclear, present candidates — don't guess.

1.2 Find the right spec

  • Named explicitly by the user → use that
  • Fits an existing spec's responsibility → use the best fit (match by description, group, existing features)
  • Represents a new concern not covered by any spec → create a new spec

1.3 Read current state before changing

Read the target spec, all its existing feature files, and any specs that depend on it. This prevents duplicate features, conflicting scenarios, and broken dependency contracts.

1.4 Make the changes

  • Add a feature → new .feature file in features/<spec>/. Add the features field to spec frontmatter if missing.
  • Add a scenario → append to the existing .feature file, matching the surrounding step phrasing and detail level.
  • New spec → create the spec, the features dir, wire depends_on in both directions.
  • Modify dependencies → update depends_on. If new uses references don't exist yet, offer to add them as scenarios.
  • Remove a feature/spec → check downstream uses first. Warn the user about broken contracts before deleting.

1.5 Show what changed

Summarize files created/modified/deleted. Flag downstream specs that may need attention.

Phase 1 rules

  • Don't change features without asking — specs are owned by the user.
  • Match existing style (step phrasing, scenario detail, naming).
  • Check downstream before removing.

Phase 2 — Implement red/green

Use this phase to make the (now-updated) feature scenarios pass.

2.1 Read the spec

  • What is this module responsible for? (description, body)
  • What does it depend on? (depends_on and uses)
  • Where do its features live? (features field)

If implementing multiple specs, walk the dependency graph: start with specs that have no depends_on (roots) and work down. The features a spec uses from a dependency must already pass before that spec is implemented.

2.2 List the scenarios

Read every .feature file in the spec's features directory. Each Scenario: is a concrete behavior the implementation must satisfy. List them out — that's the implementation checklist.

2.3 Red — confirm scenarios fail

Run the feature suite. Every scenario for this spec must fail because the implementation doesn't exist yet. If a scenario passes before code is written, investigate — either the test setup is wrong or the feature is already implemented elsewhere.

2.4 Green — implement one scenario at a time

  1. Pick the simplest scenario first.
  2. Write the minimum code to make it pass.
  3. Run the feature → confirm green.
  4. Move to the next scenario.
  5. Refactor only after all scenarios in a feature pass.

Do not add functionality that isn't described in a scenario. If something seems missing → return to Phase 1, add a scenario, then implement.

2.5 Verify dependency contracts

If the spec declares uses against a dependency, the implementation must actually consume those features. If it doesn't, either the implementation is wrong or the spec needs updating — flag it and return to Phase 1 if the user agrees.

2.6 Run the full feature suite

After implementing one spec, run *all* features — not just the one you worked on. Implementation of one spec must not break another's.

Phase 2 rules

  • Features are the contract. A passing suite means the implementation is correct; a failing scenario means the implementation is wrong (not the feature).
  • If a feature seems wrong → stop, ask the user, return to Phase 1 if they confirm a change.
  • Never silently skip or disable a scenario.
  • Step definitions must be thin — they translate Gherkin to calls into src/. No business logic in step definitions.

Reference: spec file format

Each spec is a .md file inside the spec directory with YAML frontmatter and an optional markdown body.

Frontmatter fields

FieldRequiredTypeDescription
nameYesstringUnique identifier. How other specs reference it in depends_on.
descriptionNostringShort summary. Shown in the graph info panel.
groupNostringLogical grouping. Specs in the same group are visually clustered.
tagsNostring[]Tags for filtering and categorization.
depends_onNoarrayDependencies. Supports simple strings and objects with uses.
featuresNostringRelative path to the directory containing this spec's .feature files.

A file without a name is silently skipped.

Minimal spec

---
name: bootstrap
---

Full spec

---
name: persistence
description: SQLite database layer for local storage
group: infrastructure
tags: [database, storage]
depends_on:
  - name: bootstrap
    uses: [project-scaffolding, health-endpoint]
features: features/persistence/
---

# Persistence

This spec covers the database abstraction layer.

## Decisions
- Use SQLite for local-first storage
- Migrations managed via versioned SQL files

The markdown body renders in the side panel when a node is clicked. Use it for design rationale, API notes, decisions, or anything useful that isn't a scenario.

Dependency format

depends_on supports two forms that can be mixed:

Simple:

depends_on:
  - bootstrap
  - config

Rich (with feature references):

depends_on:
  - name: bootstrap
    uses: [project-scaffolding, health-endpoint]
  - name: persistence
    uses: [data-storage]

The uses array references Feature: names declared in the parent spec's .feature files. This creates a traceable contract between modules and shows up as a labeled edge in the graph.

Dependency rules

  • Matched case-insensitively against other specs' name.
  • A reference to a non-existent name is silently ignored.
  • Cycles are allowed but visualized as cycles.
  • Roots (no depends_on) appear at the top in tree layout.

Groups

Specs sharing a group value are clustered with a colored hull. Use them for domain organization (infrastructure, data, api, ui).


Reference: Gherkin feature files

Feature files use standard Gherkin. They live in the directory referenced by features:. Feature names are the public interface of a spec — other specs declare which features they uses.

Structure

@optional-tag
Feature: feature-name-in-kebab-case
  Optional description text.

  Scenario: First scenario name
    Given some precondition
    When an action is performed
    Then an expected outcome occurs
    And another assertion

  Scenario: Second scenario name
    Given a different setup
    When something else happens
    Then verify the result

Rules

  • One Feature: per file (first one is used).
  • Feature names must be kebab-case: Feature: data-storage, not Feature: Data Storage.
  • Same kebab-case applies to uses references.
  • Steps use Given, When, Then, And, But.
  • File extension must be .feature.
  • Filename should match feature name: data-storage.feature.

Step definitions

  • Location, language, and file convention are decided per project — match what's already there.
  • Steps are thin — they translate Gherkin to calls into src/. No business logic in steps.

Reference: CLI

modspec ./spec/                       # Dev server with live reload (default)
modspec ./spec/ -y                    # Auto-create spec dir if missing
modspec ./spec/ --port 4000           # Custom port
modspec ./spec/ --output graph.html   # Static HTML export
FlagDescription
--output, -oSave HTML to path instead of serving
--portDev server port (default 3333)
-y, --yesAuto-create spec dir if missing
--help, -hShow help

The dev server watches spec and feature files for changes and pushes updates to the browser in real time.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.93%
按下载量换算26

Claude

26.17%
按下载量换算19

Cursor

19.79%
按下载量换算14

Gemini CLI

9.71%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills