Token导航 LogoToken导航TokenDH.com
前端设计敏感数据github未标认证来源可访问许可证需确认审计通过

modspec-init模组规范初始化

Agent Skill

modspec-init 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

225

周安装

9

GitHub Stars

公开资料未说明

下载量

73
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

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

简介

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中整理仓库状态和代码变更。
  • 可结合来源仓库和原始 README 核验具体用法。
  • 安装前建议确认权限范围和维护状态,避免触发联网或文件读写。
  • modspec-init 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

modspec-init — Brownfield Spec Generator

You are helping the user generate modspec specification files from an existing codebase. This is for brownfield adoption — the project already has code and you need to create specs that reflect its current structure.

Goal

Analyze the existing codebase and generate:

  1. Spec files (.md with YAML frontmatter) for each identifiable module
  2. Feature files (.feature with Gherkin scenarios) for each module's public interface (optional)

Process

Step 1: Analyze the codebase

Examine the project structure to identify modules. Look for:

  • Package/directory boundaries: Distinct directories or packages that represent separate concerns
  • Entry points: Main files that serve as the module's public surface
  • Export patterns: What does each module expose to others?
  • Import patterns: What does each module consume from others?
  • Configuration boundaries: Separate config, shared state, dependency wiring

Step 2: Identify dependencies

For each module, determine:

  • Which other modules it imports from or depends on
  • Which specific functionality (features) it uses from each dependency
  • Whether the dependency is direct or transitive

Step 3: Identify features (public interface)

For each module, identify the features it provides — its public API surface:

  • Capabilities it exposes to other modules or external consumers
  • Endpoints or interfaces it serves
  • Events or notifications it emits
  • Commands or operations it handles
  • Data it stores or retrieves

Name features in kebab-case: user-login, data-storage, api-routing.

Step 4: Generate spec files

Create a spec directory (default: spec/) and generate one .md file per module:

---
name: module-name
description: Brief description of what this module does
group: logical-group
tags: [relevant, tags]
depends_on:
  - name: other-module
    uses: [feature-a, feature-b]
features: features/module-name/
---

# Module Name

Brief description and any design notes.

Step 5: Generate feature files (optional)

If the user requests features, create a features/ directory with subdirectories per module:

Feature: feature-name-in-kebab-case
  Description of what this feature provides.

  Scenario: Key behavior description
    Given some precondition
    When an action occurs
    Then expected outcome

Guidelines

Technology-agnostic specs or not

This is critical unless requested explicitly by the user. Specs must describe modules and features at a high level of abstraction, independent of any specific programming language, framework, or technology. The spec captures what a module does and why, never how it does it.

  • No language-specific terms: Don't reference classes, functions, decorators, hooks, middleware, or any language construct. Describe capabilities and responsibilities instead.
  • No framework references: Don't mention Express, Django, React, Rails, Spring, etc. Describe the architectural role.
  • No implementation details: Don't reference file extensions, import paths, specific libraries, ORMs, or drivers. Describe the concern being addressed.
  • Describe intent, not mechanism: "Provides persistent data storage and retrieval" not "PostgreSQL connection pool and query interface". "Verifies caller identity" not "JWT token validation middleware".

The spec should remain valid even if the project is rewritten in a completely different language or framework.

If the user explicitly mentions to keep the tech stack as part of the spec, then make sure concepts, and modularity is reflected as part of the specs including the bootstrap

Module granularity

  • Right-sized: Each spec should represent a meaningful unit that could be developed, tested, and reasoned about independently.
  • Not too granular: Don't create a spec per file. Group related files into a single module spec.
  • Not too broad: Don't lump unrelated concerns together. A "utils" spec is a code smell — break it into focused modules.

Naming

  • Spec names: kebab-case, matching the module/directory name where possible
  • Feature names: kebab-case, describing the capability (e.g., data-storage, not DatabaseClass)
  • File names: Match the spec/feature name (e.g., data-storage.feature, auth.md)

Groups

Assign groups based on architectural layers or domains:

  • foundation — bootstrap, configuration, shared primitives
  • infrastructure — data persistence, caching, messaging, external integrations
  • domain — core business logic modules
  • interface — APIs, user-facing endpoints, external service contracts
  • presentation — UI components, pages, layouts
  • Or use domain-specific groupings that match the project

Feature identification heuristics

Examine the code to identify capabilities, then abstract them into technology-neutral feature names:

What you see in codeFeature name (tech-agnostic)
Functions that create user recordsuser-creation
A health-check route/endpointhealth-reporting
Code that runs queries against a data storedata-querying
Code that wraps multiple operations atomicallytransactional-operations
Event emission on order completionorder-lifecycle-events
Schema migration filesschema-evolution

Dependency detection heuristics

What you see in codeDependency (tech-agnostic)
Module imports another module's data layerDirect: uses data-persistence module
Dependency injection of an auth componentDirect: uses identity module
Network calls to another module's endpointsIndirect: uses interface module
Reading configuration from environment/filesInfrastructure: depends on configuration module
Shared type definitions or contractsStructural: depends on contracts module

Example output

For a project with auth, data storage, API, and configuration concerns:

spec/configuration.md:

---
name: configuration
description: Manages application settings and environment-specific values
group: foundation
tags: [config, environment]
depends_on: []
features: features/configuration/
---

# Configuration

Loads, validates, and provides application settings to all modules. Ensures required values are present and well-formed before the application starts.

spec/data-storage.md:

---
name: data-storage
description: Persistent data storage and retrieval
group: infrastructure
tags: [data, persistence]
depends_on:
  - name: configuration
    uses: [settings-access]
features: features/data-storage/
---

# Data Storage

Provides a reliable interface for persisting and retrieving application data. Manages connection lifecycle and ensures data integrity.

spec/auth.md:

---
name: auth
description: Identity verification and session management
group: domain
tags: [auth, security, identity]
depends_on:
  - name: data-storage
    uses: [data-querying, transactional-operations]
  - name: configuration
    uses: [settings-access]
features: features/auth/
---

# Auth

Verifies user identity, manages credentials, and maintains session state. Controls access to protected resources.

features/data-storage/data-querying.feature:

Feature: data-querying
  Retrieve stored data by various criteria.

  Scenario: Retrieve records matching a filter
    Given the data store contains records
    When a query is submitted with filter criteria
    Then only matching records are returned

  Scenario: Handle invalid queries gracefully
    Given a connected data store
    When a malformed query is submitted
    Then a descriptive error is returned without exposing internals

Interactive workflow if user specified --interactive

  1. Ask the user which directory to analyze (or use the current project root) - Default:./spec and./features in current root
  2. Present the identified modules and their dependencies for review - Default: Accept
  3. Ask if they want feature files generated too - Default: Yes
  4. Generate the files
  5. Suggest running modspec./spec/ to visualize the result
  6. Iterate — the user may want to adjust groupings, split/merge modules, or refine features

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

37.39%
按下载量换算27

Claude

29.31%
按下载量换算21

Cursor

19.35%
按下载量换算14

Gemini CLI

8.96%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

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

来源信息

继续浏览同类 Skills