Token导航 LogoToken导航

Agent Skill · 开发

bad-example-skill(糟糕的榜样技能)

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

bad-example-skill 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证为 MIT,第三方扫描已通过,按安装量在开发类的 21,746 个 Skill 里排第 7,925。

总安装 3,452周安装 141GitHub Stars 39下载 1,105核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/bobmatnyc/claude-mpm-skills --skill bad-example-skill

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

bad-example-skill 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。

它是一个反模式示例,展示不应采用的依赖结构和文档组织方式,警示技能间的耦合风险。使用时需注意避免相对路径依赖和分散式文档管理,参考 good-self-contained-skill 获取正确做法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

可通过来源仓库和原始 README 继续核验正确技能的结构和测试模式。

来源仓库内路径:skills/bad-example-skill

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/bobmatnyc/claude-mpm-skills --skill bad-exampl…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

bad-example-skill 怎么安装?

在终端执行 npx skills add https://github.com/bobmatnyc/claude-mpm-skills --skill bad-example-skill。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

bad-example-skill 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

bad-example-skill 需要什么权限?

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

bad-example-skill 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

bad-example-skill 用的人多吗?

公开数据是累计安装 3,452 次,近一周安装 141 次,下载 1,105 次,GitHub 39 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

bad-example-skill 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
bad-example-skill

糟糕的榜样技能 · 本页

3,45239需要联网MIT通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

⚠️ BAD EXAMPLE - Interdependent Skill (Anti-Pattern)

WARNING: This is an ANTI-PATTERN example showing what NOT to do.

DO NOT COPY THIS STRUCTURE. See good-self-contained-skill for correct approach.


❌ VIOLATION #1: Relative Path Dependencies

## Related Documentation

For setup instructions, see [../setup-skill/SKILL.md](../setup-skill/SKILL.md)

For testing patterns, see:
- [../../testing/pytest-patterns/](../../testing/pytest-patterns/)
- [../../testing/test-utils/](../../testing/test-utils/)

Database integration: [../../data/database-skill/](../../data/database-skill/)

Why This is Wrong:

  • ❌ Uses relative paths (../, ../../)
  • ❌ Assumes hierarchical directory structure
  • ❌ Breaks in flat deployment (~/.claude/skills/)
  • ❌ Links break when skill deployed standalone

Correct Approach:

## Complementary Skills

Consider these related skills (if deployed):

- **setup-skill**: Installation and configuration patterns
- **pytest-patterns**: Testing framework and fixtures
- **database-skill**: Database integration patterns

*Note: All skills are independently deployable.*

❌ VIOLATION #2: Missing Essential Content

## Testing

This skill uses pytest for testing.

**See pytest-patterns skill for all testing code.**

To write tests for this framework, install pytest-patterns skill
and refer to its documentation.

Why This is Wrong:

  • ❌ No actual testing patterns included
  • ❌ Requires user to have another skill
  • ❌ Skill is incomplete without other skills
  • ❌ "See other skill" instead of inlining

Correct Approach:

## Testing (Self-Contained)

**Essential pytest pattern** (inlined):

import pytest from example_framework.testing import TestClient

@pytest.fixture def client(): """Test client fixture.""" return TestClient(app)

def test_home_route(client): """Test homepage.""" response = client.get("/") assert response.status_code == 200 assert response.json() == {"message": "Hello"}


**Advanced fixtures** (if pytest-patterns skill deployed):

- Parametrized fixtures
- Database session fixtures
- Mock fixtures

*See pytest-patterns skill for comprehensive patterns.*

❌ VIOLATION #3: Hard Skill Dependencies

## Prerequisites

**Required Skills**:
1. **setup-skill** - Must be installed first
2. **database-skill** - Required for database operations
3. **pytest-patterns** - Required for testing

Install all required skills before using this skill:

claude-code skills add setup-skill database-skill pytest-patterns


This skill will not work without these dependencies.

Why This is Wrong:

  • ❌ Lists other skills as "Required"
  • ❌ Skill doesn't work standalone
  • ❌ Creates deployment coupling
  • ❌ Violates self-containment principle

Correct Approach:

## Prerequisites

**External Dependencies**:

pip install example-framework pytest sqlalchemy


## Complementary Skills

When using this skill, consider (if deployed):

- **setup-skill**: Advanced configuration patterns (optional)
- **database-skill**: ORM patterns and optimization (optional)
- **pytest-patterns**: Testing enhancements (optional)

*This skill is fully functional independently.*

❌ VIOLATION #4: Cross-Skill Imports

"""
Bad example - importing from other skills.
"""

# ❌ DON'T DO THIS
from skills.database_skill import get_db_session
from skills.pytest_patterns import fixture_factory
from ..shared.utils import validate_input

# Using imported patterns
@app.route("/users")
def create_user(data):
    # Requires database-skill to be installed
    with get_db_session() as session:
        user = User(**data)
        session.add(user)
        return user.to_dict()

Why This is Wrong:

  • ❌ Imports from other skills
  • ❌ Code won't run without other skills
  • ❌ Creates runtime dependencies
  • ❌ Violates Python module boundaries

Correct Approach:

"""
Good example - self-contained implementation.
"""
from contextlib import contextmanager

# ✅ Include pattern directly in this skill
@contextmanager
def get_db_session():
    """Database session context manager (self-contained)."""
    db = SessionLocal()
    try:
        yield db
        db.commit()
    except Exception:
        db.rollback()
        raise
    finally:
        db.close()

@app.route("/users")
def create_user(data):
    # Works independently
    with get_db_session() as session:
        user = User(**data)
        session.add(user)
        return user.to_dict()

❌ VIOLATION #5: Hierarchical Directory Assumptions

## Project Structure

This skill is located in:

toolchains/python/frameworks/bad-example-skill/

**Navigate to parent directories for related skills**:
- `../` - Other framework skills
- `../../testing/` - Testing skills
- `../../data/` - Database skills

**All skills in `toolchains/python/frameworks/` are related to this skill.**

Why This is Wrong:

  • ❌ Assumes specific directory structure
  • ❌ Navigation instructions using relative paths
  • ❌ Won't work in flat deployment
  • ❌ Confuses deployment location with skill relationships

Correct Approach:

## Related Skills

**Complementary Python Framework Skills** (informational):

- **fastapi-patterns**: Web framework patterns
- **django-patterns**: Full-stack framework patterns
- **flask-patterns**: Micro-framework patterns

**Testing Skills**:
- **pytest-patterns**: Testing framework
- **test-driven-development**: TDD workflow

*Note: Skills are independently deployable. Directory structure may vary.*

❌ VIOLATION #6: Incomplete Examples

# Database setup
# (See database-skill for complete implementation)

class User(db.Model):
    # ... see database-skill for model definition ...
    pass

# Testing
# (See pytest-patterns for test examples)

def test_user():
    # ... see pytest-patterns for fixtures ...
    pass

# Deployment
# (See deployment-skill for production setup)

Why This is Wrong:

  • ❌ Examples are fragments, not complete code
  • ❌ "See other skill" instead of showing code
  • ❌ Users can't copy-paste and run
  • ❌ Skill provides no actual implementation guidance

Correct Approach:

# Complete database model (self-contained)
from sqlalchemy import Column, Integer, String
from sqlalchemy.ext.declarative import declarative_base

Base = declarative_base()

class User(Base):
    """User model - complete implementation."""
    __tablename__ = "users"

    id = Column(Integer, primary_key=True)
    username = Column(String(80), unique=True, nullable=False)
    email = Column(String(120), unique=True, nullable=False)

    def to_dict(self):
        return {
            "id": self.id,
            "username": self.username,
            "email": self.email
        }

# Complete test example (self-contained)
import pytest
from example_framework.testing import TestClient

@pytest.fixture
def client():
    return TestClient(app)

def test_create_user(client):
    """Test user creation - complete working test."""
    response = client.post("/users", json={
        "username": "testuser",
        "email": "test@example.com"
    })
    assert response.status_code == 201
    assert response.json()["username"] == "testuser"

# Complete deployment example (self-contained)
import os

class ProductionConfig:
    DEBUG = False
    SECRET_KEY = os.getenv("SECRET_KEY")
    DATABASE_URL = os.getenv("DATABASE_URL")

app = App(config=ProductionConfig())

# Run with: gunicorn -w 4 app:app

❌ VIOLATION #7: References Directory with Cross-Skill Paths

bad-example-skill/
├── SKILL.md
├── metadata.json
└── references/
    ├── testing.md          # Contains: ../../pytest-patterns/
    ├── database.md         # Contains: ../../database-skill/
    └── deployment.md       # Contains: ../../../universal/deployment/

references/testing.md contains:

# Testing Patterns

For complete testing patterns, see:
- [Pytest Patterns](../../pytest-patterns/SKILL.md)
- [TDD Workflow](../../../universal/testing/test-driven-development/)

Refer to those skills for all testing code.

Why This is Wrong:

  • ❌ References directory has cross-skill paths
  • ❌ Progressive disclosure leads outside skill
  • ❌ Breaks in flat deployment
  • ❌ References aren't self-contained

Correct Approach:

good-example-skill/
├── SKILL.md
├── metadata.json
└── references/
    ├── advanced-patterns.md    # All about THIS skill
    ├── api-reference.md        # THIS skill's API
    └── examples.md             # THIS skill's examples

references/advanced-patterns.md should contain:

# Advanced Testing Patterns

**Advanced pytest fixtures** (this skill):

Parametrized test fixture

@pytest.fixture(params=["value1", "value2"]) def data_variants(request): return request.param

def test_with_variants(data_variants): # Test with multiple data variants assert process(data_variants) is not None


**Further enhancements** (if pytest-patterns deployed):

- Fixture factories
- Custom markers
- Plugin integration

*See pytest-patterns skill for comprehensive advanced patterns.*

❌ VIOLATION #8: metadata.json with Skill Dependencies

{
  "name": "bad-example-skill",
  "version": "1.0.0",
  "requires": [
    "setup-skill",
    "database-skill",
    "pytest-patterns"
  ],
  "self_contained": false,
  "dependencies": ["example-framework"],
  "notes": [
    "This skill requires setup-skill to be installed first",
    "Must deploy with database-skill for database operations",
    "Won't work without pytest-patterns for testing"
  ]
}

Why This is Wrong:

  • ❌ Lists other skills in "requires" field
  • ❌ "self_contained": false
  • ❌ Notes say skill won't work without others
  • ❌ Creates deployment coupling

Correct Approach:

{
  "name": "good-example-skill",
  "version": "1.0.0",
  "requires": [],
  "self_contained": true,
  "dependencies": ["example-framework", "pytest", "sqlalchemy"],
  "complementary_skills": [
    "setup-skill",
    "database-skill",
    "pytest-patterns"
  ],
  "notes": [
    "This skill is fully self-contained and works independently",
    "All essential patterns are inlined",
    "Complementary skills provide optional enhancements"
  ]
}

Summary of Violations

ViolationExampleImpact
Relative Paths../../other-skill/Breaks in flat deployment
Missing Content"See other skill for X"Incomplete, not self-sufficient
Hard Dependencies"Requires other-skill"Can't deploy standalone
Cross-Skill Importsfrom skills.other importRuntime dependency
Hierarchical Assumptions"Navigate to parent dir"Location-dependent
Incomplete ExamplesCode fragments onlyNot usable
References Cross-Skillreferences/ has ../Progressive disclosure broken
Metadata Dependencies"requires": ["skill"]Deployment coupling

How to Fix These Violations

Step 1: Remove All Relative Paths

# Find violations
grep -r "\.\\./" bad-example-skill/

# Remove them - use skill names instead
# ❌ [skill](../../skill/SKILL.md)
# ✅ skill (if deployed)

Step 2: Inline Essential Content

# Before (wrong):
## Testing
See pytest-patterns skill for all testing code.

# After (correct):
## Testing (Self-Contained)

**Essential pattern** (inlined):
[20-50 lines of actual testing code]

**Advanced patterns** (if pytest-patterns deployed):
- Feature list

*See pytest-patterns for comprehensive guide.*

Step 3: Remove Hard Dependencies

# Before (wrong):
**Required Skills**: pytest-patterns, database-skill

# After (correct):
**Complementary Skills** (optional):
- pytest-patterns: Testing enhancements
- database-skill: ORM optimization

Step 4: Make Imports Self-Contained

# Before (wrong):
from skills.database import get_db_session

# After (correct):
@contextmanager
def get_db_session():
    """Inlined pattern."""
    # Implementation here

Step 5: Update metadata.json

// Before (wrong):
{
  "requires": ["other-skill"],
  "self_contained": false
}

// After (correct):
{
  "requires": [],
  "self_contained": true,
  "complementary_skills": ["other-skill"]
}

Verification

After fixing, verify self-containment:

# Should return empty (no violations)
grep -r "\.\\./" skill-name/
grep -r "from skills\." skill-name/
grep -i "requires.*skill" skill-name/SKILL.md

# Isolation test
cp -r skill-name /tmp/skill-test/
cd /tmp/skill-test/skill-name
cat SKILL.md  # Should be complete and useful

# Metadata check
cat metadata.json | jq '.requires'  # Should be [] or external packages only

See Good Example Instead

DO NOT USE THIS EXAMPLE AS A TEMPLATE

Instead, see:


Remember: This example shows what NOT to do. Always ensure your skills are self-contained!

平台分布

Claude Code

28.77%
按下载量换算318

OpenCode

25.57%
按下载量换算283

Gemini CLI

18.05%
按下载量换算199

Antigravity

12.14%
按下载量换算134

github-copilot

8.25%
按下载量换算91

Cursor

3.66%
按下载量换算40

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills