### Examples for Installing Skills Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/13-skills-search.md Examples of installing skills, including standard installation, namespaced skills, and project-specific installations. ```bash ccpm install pdf-processor # 安装pdf-processor skill ccpm install @daymade/skill-creator # 安装命名空间skill ccpm install cloudflare-troubleshooting # 安装故障排除skill ccpm install react-component-builder --project # 仅为当前项目安装 ``` -------------------------------- ### Workflow: Find and Install Skills Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/13-skills-search.md Steps for a user to find and install a new skill, including searching, reviewing, getting details, and installing. ```bash ccpm search ccpm info ccpm install ``` -------------------------------- ### Example for Getting Skill Information Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/13-skills-search.md Example command to get detailed information for a specific skill. ```bash ccpm info skill-creator ``` -------------------------------- ### Install a Plugin Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/29-claude-skills-troubleshooting.md Install a plugin from a specified marketplace. ```bash claude plugin install {plugin}@{marketplace} ``` -------------------------------- ### Initialize a New Skill Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/12-skill-creator.md Use the `init_skill.py` script to generate a new skill directory with a template SKILL.md and example resource folders. This script automates the initial setup for a new skill. ```bash scripts/init_skill.py --path ``` -------------------------------- ### Example for Uninstalling Skills Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/13-skills-search.md Example command to uninstall a specific skill. ```bash ccpm uninstall pdf-processor ``` -------------------------------- ### Install Markitdown with PDF Support Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/17-markdown-tools.md Install the markitdown tool with PDF capabilities using 'uv tool install' or 'pip'. The '[pdf]' extra is crucial for PDF support. ```bash # Important: use the [pdf] extra for PDF support uv tool install "markitdown[pdf]" # Or via pip pip install "markitdown[pdf]" ``` -------------------------------- ### Example User Authentication Implementation Plan Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/04-writing-plans.md A concrete example of an implementation plan for a user authentication feature. It details tasks like setting up the database schema, implementing email/password registration, and handling Google OAuth. ```markdown # 用户认证功能实施计划 ## 概述 实现用户认证功能,支持邮箱密码和Google OAuth登录。此功能允许用户创建账户、登录和管理会话。 ## 目标 - 用户可以用邮箱和密码创建账户 - 用户可以用Google OAuth登录 - 用户可以安全地登出 - 会话在24小时后过期 ## 前提条件 - 数据库已设置 - Google OAuth客户端ID已配置 - JWT密钥已生成 ## 任务 ### Task 1: 设置数据库schema **优先级:** 高 **估算:** 1小时 **步骤:** 1. 创建users表 2. 添加索引到email字段 3. 创建sessions表 4. 运行迁移 **验收标准:** - users表存在并包含所有必需字段 - email字段有唯一索引 - sessions表存在 - 迁移成功运行 **依赖:** 无 ### Task 2: 实现邮箱密码注册 **优先级:** 高 **估算:** 2小时 **步骤:** 1. 创建注册API端点 2. 实现密码哈希 3. 验证邮箱格式 4. 保存用户到数据库 **验收标准:** - POST /api/register存在 - 密码使用bcrypt哈希 - 无效邮箱返回400错误 - 有效邮箱创建用户记录 **依赖:** Task 1 ### Task 3: 实现Google OAuth **优先级:** 中 **估算:** 3小时 **步骤:** 1. 设置OAuth流程 2. 实现回调端点 3. 创建/更新用户记录 4. 生成JWT token **验收标准:** - 用户可以重定向到Google OAuth - 回调成功处理 - JWT token返回给客户端 - 用户记录创建或更新 **依赖:** Task 1 ## 验证 - 运行所有注册测试 - 运行所有登录测试 - 手动测试OAuth流程 - 验证会话过期 ## 回退计划 如果OAuth集成太复杂: 1. 先实现邮箱密码登录 2. OAuth作为后续任务 ``` -------------------------------- ### Run Project Setup Commands Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/08-using-git-worktrees.md Automatically detects and runs appropriate setup commands based on project files like package.json, Cargo.toml, requirements.txt, pyproject.toml, or go.mod. ```bash # Node.js if [ -f package.json ]; then npm install; fi # Rust if [ -f Cargo.toml ]; then cargo build; fi # Python if [ -f requirements.txt ]; then pip install -r requirements.txt; fi if [ -f pyproject.toml ]; then poetry install; fi # Go if [ -f go.mod ]; then go mod download; fi ``` -------------------------------- ### Install Skills with Options Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/13-skills-search.md Install a skill to make it available in Claude Code. Options allow for project-specific installation or forcing a reinstallation. ```bash ccpm install [options] 选项: --project 仅安装到当前项目(默认:用户级别) --force 即使已安装也强制重新安装 ``` -------------------------------- ### Integration Plan Example Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/23-docs-cleaner.md This example shows the expected outcome of the documentation cleaning process, detailing the reduction in lines and files while maintaining 100% value. ```markdown ``` 之前:726行(3个文件,高冗余) 之后:~100行(1个文件 + CLAUDE.md中的引用) 减少:86% 价值保留:100% ``` ``` -------------------------------- ### Basic CCPM Commands Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/13-skills-search.md Commonly used commands for searching, installing, listing, and getting information about skills. ```bash ccpm search ccpm install ccpm list ccpm info ``` -------------------------------- ### Install Gitleaks Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/12-skill-creator.md Instructions for installing gitleaks, a tool used by the security scanner to detect hardcoded secrets. Installation methods vary by operating system. ```bash # macOS brew install gitleaks # Linux/Windows - 见脚本输出以获取安装说明 ``` -------------------------------- ### List Installed Skills Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/13-skills-search.md Display all currently installed skills with options for JSON output. ```bash ccpm list [options] 选项: --json 输出为JSON ``` -------------------------------- ### Enable a Plugin Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/29-claude-skills-troubleshooting.md Activate a plugin that has already been installed. ```bash claude plugin enable {plugin}@{marketplace} ``` -------------------------------- ### Example Workflow Output Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/08-using-git-worktrees.md Illustrates a typical interaction and output when using the 'using-git-worktrees' skill to set up an isolated workspace. ```text You: I'm using the using-git-worktrees skill to set up an isolated workspace. [Checks .worktrees/ - Exists] [Verifies ignored - git check-ignore confirms .worktrees/ is ignored] [Creates worktree: git worktree add .worktrees/auth -b feature/auth] [Runs npm install] [Runs npm test - 47 passed] Worktree ready at /Users/jesse/myproject/.worktrees/auth Tests passed (47 tests, 0 failures) Ready to implement auth feature ``` -------------------------------- ### Check Installed Plugins Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/29-claude-skills-troubleshooting.md List all plugins that are currently installed, regardless of their active status. Uses jq for filtering JSON output. ```bash cat ~/.claude/plugins/installed_plugins.json | jq '.plugins | keys' ``` -------------------------------- ### Examples for Searching Skills Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/13-skills-search.md Demonstrates various ways to search for skills, including by keyword, phrase, and with a limit on results. ```bash ccpm search pdf # 查找PDF相关skills ccpm search "code review" # 查找代码审查skills ccpm search cloudflare # 查找Cloudflare工具 ccpm search --limit 20 react # 查找React skills,显示20个结果 ``` -------------------------------- ### Run Baseline Tests Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/08-using-git-worktrees.md Executes tests to ensure the worktree starts from a clean baseline. Examples include npm test, cargo test, pytest, and go test. ```bash # Example - use appropriate commands npm test cargo test pytest go test ./... ``` -------------------------------- ### Example: Unclear Item (Good) Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/11-receiving-code-review.md Demonstrates the correct way to respond when some feedback items are understood but others are unclear. ```text Your partner: "Fix items 1-6" You understand 1, 2, 3, 6. Unclear 4, 5. ✅ "I understand items 1, 2, 3, and 6. I need clarification on 4 and 5 before proceeding." ``` -------------------------------- ### Global Installation of CCPM Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/13-skills-search.md Command to globally install the CCPM CLI using npm, typically used when 'ccpm: command not found' error occurs. ```bash npm install -g @daymade/ccpm ``` -------------------------------- ### Get Skill Information Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/13-skills-search.md Retrieve detailed information about a skill from the registry, including its description, author, and dependencies. ```bash ccpm info ``` -------------------------------- ### Example Code Review Request Workflow Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/10-requesting-code-review.md Illustrates a typical workflow for requesting a code review after completing a task. It shows how to obtain SHAs, dispatch the code-reviewer sub-agent with specific implementation details, and act on the feedback received. ```bash [刚完成Task 2: 添加验证函数] 你:让我在继续之前请求代码审查。 BASE_SHA=$(git log --oneline | grep "Task 1" | head -1 | awk '{print $1}') HEAD_SHA=$(git rev-parse HEAD) [分派superpowers:code-reviewer子代理] WHAT_WAS_IMPLEMENTED: 对话索引的验证和修复函数 PLAN_OR_REQUIREMENTS: docs/plans/deployment-plan.md中的Task 2 BASE_SHA: a7981ec HEAD_SHA: 3df7661 DESCRIPTION: 添加了verifyIndex()和repairIndex(),包含4个问题类型 [子代理返回]: 优势:清洁的架构,真实测试 问题: 重要:缺少进度指示器 次要:魔法数字(100)用于报告间隔 评估:准备继续 你:[修复进度指示器] [继续到Task 3] ``` -------------------------------- ### Check Plugin Installation and Activation Status Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/29-claude-skills-troubleshooting.md Verify if a plugin is registered in installed_plugins.json and enabled in settings.json. This helps diagnose issues where a plugin is installed but not active. ```bash cat ~/.claude/plugins/installed_plugins.json | grep "plugin-name" ``` ```bash cat ~/.claude/settings.json | grep "plugin-name" ``` -------------------------------- ### Run Plugin Diagnosis Script Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/29-claude-skills-troubleshooting.md Execute this script to automatically identify common plugin installation and configuration problems. ```bash python3 scripts/diagnose_plugins.py ``` -------------------------------- ### Example of Handling Unclear Feedback Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/11-receiving-code-review.md Illustrates the correct way to respond when some feedback items are unclear, contrasting a wrong approach with a correct one. ```text Your partner: "Fix 1-6" You understand 1, 2, 3, 6. Unclear 4, 5. ❌ Wrong: Implement 1, 2, 3, 6 now, ask about 4, 5 later ✅ Correct: "I understand items 1, 2, 3, and 6. I need clarification on 4 and 5 before proceeding." ``` -------------------------------- ### Enable a Plugin via CLI or Manually Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/29-claude-skills-troubleshooting.md Use the command-line interface or manually edit settings.json to enable a plugin. This is a solution when a plugin is installed but not automatically enabled. ```bash claude plugin enable plugin-name@marketplace-name ``` ```json "plugin-name@marketplace-name": true ``` -------------------------------- ### Batch Enable Missing Plugins Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/29-claude-skills-troubleshooting.md A script to enable all installed plugins that are currently disabled. Specify the marketplace name as an argument. ```bash python3 scripts/enable_all_plugins.py marketplace-name ``` -------------------------------- ### Example Brainstorming Workflow for User Authentication Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/01-brainstorming.md Demonstrates a typical interaction flow where Claude uses the Brainstorming skill to gather requirements for adding user authentication. It shows how Claude asks clarifying questions, presents options, and incrementally builds a design proposal. ```natural_language 用户: 我想添加用户认证功能 Claude: 让我先了解当前项目状态... [检查文件、文档、最近提交] Claude: 认证方式应该支持哪些登录方法? A) 仅邮箱密码 B) 邮箱密码 + 社交媒体 C) 邮箱密码 + 社交媒体 + 手机号 用户: 选择B Claude: 好的。对于社交媒体登录,需要支持哪些平台? A) Google + Facebook B) Google + Facebook + Twitter C) Google + Facebook + Twitter + GitHub 用户: 选择A [继续细化需求...] Claude: 我有足够信息了。让我展示设计方案... ## 架构设计 [200-300字] 到目前为止看起来正确吗? 用户: 是的 Claude: ## 组件设计 [200-300字] 到目前为止看起来正确吗? [继续...] ``` -------------------------------- ### Example Value Analysis Table Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/23-docs-cleaner.md This table illustrates how to analyze sections of documentation for their value, categorizing them as 'Retain', 'Compress', or 'Delete' based on criteria like uniqueness, necessity, and redundancy. ```markdown | 节 | 行数 | 价值 | 原因 | |-----|-------|-------|--------| | API参考 | 25 | 保留 | 唯一的端点文档 | | 设置步骤 | 40 | 压缩 | 冗长但必要 | | 测试结果 | 30 | 删除 | 一次性记录,不是参考 | ``` -------------------------------- ### Markdown Image Reference Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/17-markdown-tools.md Example of how to insert image references in Markdown format after extracting images. ```markdown ![description](assets/img_page1_1.png) ``` -------------------------------- ### EARS Transformation Examples Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/14-prompt-optimizer.md Illustrates the conversion of a vague requirement into structured EARS patterns. This is useful for understanding how to apply the EARS methodology to specific requirements. ```text 之前:"创建带有任务管理的提醒应用" 之后(EARS): 1. 当用户创建任务时,系统应该引导分解为可执行的子任务 2. 当任务截止时间在30分钟内且用户尚未开始时,系统应该发送带有声音警报的通知 3. 当用户完成子任务时,系统应该更新进度并提供积极反馈 ``` -------------------------------- ### Agent Prompt Structure for Specific Fixes Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/22-dispatching-parallel-agents.md This markdown example details a focused agent prompt for fixing specific test failures in a file. It outlines the problem, provides context, and specifies the desired output, emphasizing the need to find the root cause rather than just increasing timeouts. ```markdown Fix 3 failing tests in src/agents/agent-tool-abort.test.ts: 1. "should abort tool with partial output capture" - expected message has 'interrupted at' 2. "should handle mixed completed and aborted tools" - fast tools are aborted instead of completed 3. "should properly track pendingToolCount" - expected 0 results but got 3 These are timing/race condition issues. Your task: 1. Read the test file and understand what each test verifies 2. Identify the root cause - timing issue or actual bug? 3. Fix by: - Replacing arbitrary timeouts with event-based waits - Fixing the abort implementation if a bug is found - Adjusting test expectations if the behavior changed Do not just increase timeouts - find the real problem. Return: A summary of what you found and fixed. ``` -------------------------------- ### Parallel Dispatching of Agents for Test Failures Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/22-dispatching-parallel-agents.md This example illustrates dispatching three agents in parallel to address test failures across different files. Each agent is assigned a specific file and type of failure to resolve. ```text Agent 1 → Fix agent-tool-abort.test.ts Agent 2 → Fix batch-completion-behavior.test.ts Agent 3 → Fix tool-approval-race-conditions.test.ts ``` -------------------------------- ### Convert Single Markdown File to PDF Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/19-pdf-creator.md Use this command to convert a single markdown file to a PDF document. Ensure you have weasyprint and markdown installed via uv. ```bash uv run --with weasyprint --with markdown scripts/md_to_pdf.py input.md output.pdf ``` -------------------------------- ### Interactive Terminal Session Recording Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/26-cli-demo-generator.md Record a live terminal session using this script. It starts asciinema recording, allows natural command input, and converts the session to a GIF using VHS. ```bash scripts/record_interactive.sh output.gif \ --theme "Dracula" \ --width 1400 ``` -------------------------------- ### Batch Convert Markdown Files to PDF Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/19-pdf-creator.md This command facilitates the batch conversion of multiple markdown files into PDF documents, saving them to a specified output directory. It requires weasyprint and markdown to be installed. ```bash uv run --with weasyprint --with markdown scripts/batch_convert.py *.md --output-dir ./pdfs ``` -------------------------------- ### Initialize QA Project Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/21-qa-expert.md Sets up a complete QA infrastructure with all necessary templates and directories for a new or existing project. This script creates directory structures, tracking CSVs, documentation templates, and a master prompt for autonomous execution. ```bash python scripts/init_qa_project.py [output-directory] ``` -------------------------------- ### Basic Automatic Demo Generation Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/26-cli-demo-generator.md Use this script for quick, automatic demo creation. Specify commands and the output file path. ```bash scripts/auto_generate_demo.py \ -c "npm install my-package" \ -c "npm run build" \ -o demo.gif ``` -------------------------------- ### Open Compare Modal and Load Plans Source: https://github.com/wonderslife/college-major4hs/blob/main/templates/volunteer.html Initializes and shows the comparison modal, then fetches a list of existing volunteer plans to populate the comparison checkboxes. Resets comparison results. ```javascript async function openCompareModal() { const modal = new bootstrap.Modal(document.getElementById('compareModal')); modal.show(); // 加载方案列表用于对比 try { const response = await fetch('/api/volunteer/plans'); const result = await response.json(); if (result.success && result.data.length > 0) { const compareListDiv = document.getElementById('compare-plan-list'); compareListDiv.innerHTML = result.data.map(plan => ( `
` )).join(''); } else { document.getElementById('compare-plan-list').innerHTML = '

暂无方案可对比

'; } } catch (error) { console.error('加载方案失败:', error); } // 重置对比结果 document.getElementById('comparison-result').style.display = 'none'; document.getElementById('export-compare-btn').style.display = 'none'; } ``` -------------------------------- ### List Available Devices and Simulators Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/25-developing-ios-apps.md Find the exact names of connected devices and available simulators for use with `xcodebuild`. ```bash xcrun xctrace list devices ``` -------------------------------- ### Example: Performative Agreement (Bad) Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/11-receiving-code-review.md Demonstrates an inappropriate, performative agreement to a code review comment. ```text Reviewer: "Remove legacy code" ❌ "You are absolutely right! Let me remove that..." ``` -------------------------------- ### Build Verification Pattern Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/09-verification-before-completion.md To verify a successful build, run the build command and confirm it exits with code 0. Relying solely on linter passing is insufficient as linters do not check for compilation errors. ```text ✅ [运行构建] [看到:退出0] "构建通过" ❌ "Linter通过"(linter不检查编译) ``` -------------------------------- ### Uninstall Skills with Options Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/13-skills-search.md Remove an installed skill. Options specify whether to uninstall globally or from a project. ```bash ccpm uninstall [options] 选项: --global 从用户级别安装卸载 --project 从项目级别安装卸载 ``` -------------------------------- ### Confirming Correct Feedback Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/11-receiving-code-review.md Examples of appropriate confirmations when feedback is correct, emphasizing action over verbal gratitude. ```text When feedback is correct: ✅ "Fixing. [Brief description of what changed]" ✅ "Good catch - [specific issue]. Fixed at [location]." ✅ [Just fix it and show in code] ❌ "You are absolutely right!" ❌ "Good point!" ❌ "Thanks for catching that!" ❌ "Thanks for [anything]" ❌ Any expression of gratitude ``` -------------------------------- ### Automatic Demo Generation with Options Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/26-cli-demo-generator.md Customize your demo with options like title, theme, and dimensions. The script handles timing and spacing automatically. ```bash scripts/auto_generate_demo.py \ -c "command1" \ -c "command2" \ -o output.gif \ --title "Installation Demo" \ --theme "Dracula" \ --width 1400 \ --height 700 ``` -------------------------------- ### Project Structure Before Cleanup Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/cleanup-completion-report.md Illustrates the project's directory structure before the cleanup process, highlighting unused modules and files. ```tree college-major4hs/ ├── core/ │ ├── volunteer/ # 空模块 │ ├── prediction/ # 空模块 │ └── models/ # 未使用的模型 ├── openspec/ # 未使用的配置 ├── setup_logging.py # 未使用的模块 └── AGENTS.md # 重复文档 ``` -------------------------------- ### Bash: Create Project Backup Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/cleanup-report.md These bash commands provide options for backing up the project before performing cleanup operations. It is recommended to create a Git commit or a manual copy of the project. ```bash # 创建备份 git add . git commit -m "备份:清理前的完整项目状态" # 或手动备份 cp -r . ../college-major4hs-backup-$(date +%Y%m%d) ``` -------------------------------- ### Example: YAGNI Check (Good) Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/11-receiving-code-review.md Illustrates a good use of the YAGNI principle in response to a code review suggestion for a feature that is not currently used. ```text Reviewer: "Implement correct metric tracking, with database, date filters, CSV export" ✅ "Grep the codebase - nothing calls this endpoint. Delete it (YAGNI)? Or am I missing some usage?" ``` -------------------------------- ### Run Project Test Suite Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/07-finishing-a-development-branch.md Execute the project's test suite to ensure all tests pass before proceeding. This is a mandatory step before offering completion options. ```bash # Run the project's test suite npm test / cargo test / pytest / go test ./... ``` -------------------------------- ### Example: Technical Validation (Good) Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/11-receiving-code-review.md Shows a good response to a code review comment, involving technical validation and seeking clarification on implementation details. ```text Reviewer: "Remove legacy code" ✅ "Checking... the build targets 10.15+, this API requires 13+. Legacy is needed for backward compatibility. The current implementation has the wrong bundle ID - should I fix it or remove pre-13 support?" ``` -------------------------------- ### Enhanced Prompt Structure Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/14-prompt-optimizer.md Provides a standard framework for constructing an enhanced prompt, including role, skills, workflows, examples, and formats. This structure ensures clarity and actionability in AI-generated prompts. ```markdown # Role [具有领域专业知识的特定专家角色] ## Skills - [核心能力1] - [核心能力2] [与领域理论对齐的5-8个技能列表] ## Workflows 1. [阶段1] - [关键活动] 2. [阶段2] - [关键活动] [完整的分步过程] ## Examples [带有真实数据的具体示例,不是占位符] ## Formats [精确的输出规范: - 文件类型、结构要求 - 设计/样式期望 - 技术约束 - 可交付检查表] ``` -------------------------------- ### Package a Skill Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/12-skill-creator.md Use the `package_skill.py` script to package a skill into a distributable zip file. This script also automatically validates the skill's structure and content before packaging. ```bash scripts/package_skill.py ``` ```bash scripts/package_skill.py ./dist ``` -------------------------------- ### Project Structure After Cleanup Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/cleanup-completion-report.md Shows the optimized project structure after the cleanup, with only essential files and directories remaining. ```tree college-major4hs/ ├── core/ │ ├── analytics/ # ✅ 保留 │ ├── data/ # ✅ 保留 │ ├── models/ # ✅ 保留(恢复) │ └── container.py # ✅ 保留 ├── data/ # ✅ 保留 ├── docs/ # ✅ 保留 ├── services/ # ✅ 保留 ├── templates/ # ✅ 保留 ├── utils/ # ✅ 保留 ├── web/ # ✅ 保留 ├── app_v2.py # ✅ 保留 ├── config.py # ✅ 保留 ├── requirements.txt # ✅ 保留 ├── pytest.ini # ✅ 保留 ├── README.md # ✅ 保留 ├── 启动系统.bat # ✅ 保留 └── .gitignore # ✅ 保留 ``` -------------------------------- ### Get Git SHA for Code Review Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/10-requesting-code-review.md Obtain the base and head commit SHAs required for code review. Use `git rev-parse HEAD~1` for the previous commit or `origin/main` as the base. ```bash BASE_SHA=$(git rev-parse HEAD~1) # 或 origin/main HEAD_SHA=$(git rev-parse HEAD) ``` -------------------------------- ### Reinstall Markitdown with PDF Support Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/17-markdown-tools.md Force reinstall the markitdown tool with PDF support, useful for resolving dependency issues. ```bash # Install with PDF support uv tool install "markitdown[pdf]" --force ``` -------------------------------- ### Core Verification Process Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/09-verification-before-completion.md Before claiming any status or expressing satisfaction, follow these steps: identify the command that proves the claim, run the full command, read the complete output including exit codes, and verify if the output confirms the claim. If not, state the actual status with evidence; if yes, state the claim with evidence. Skipping any step is considered lying. ```text 在声称任何状态或表达满意之前: 1. 识别:什么命令证明这个声明? 2. 运行:执行完整命令(新鲜、完整) 3. 阅读:完整输出,检查退出代码,计数失败 4. 验证:输出确认声明吗? - 如果否:用证据陈述实际状态 - 如果是:用证据陈述声明 5. 只有这样:做出声明 跳过任何步骤 = 撒谎,不是验证 ``` -------------------------------- ### Batch Demo Generation Usage Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/26-cli-demo-generator.md Execute the batch generation script using a configuration file and specify an output directory for the generated demos. ```bash scripts/batch_generate.py config.yaml --output-dir ./demos ``` -------------------------------- ### Initialize Search Variables Source: https://github.com/wonderslife/college-major4hs/blob/main/templates/search.html Sets up initial global variables for managing search state, including current search type, page number, results per page, keywords, score/rank ranges, and sorting parameters. ```javascript let currentSearchType = 'keyword'; let currentPage = 1; let perPage = 20; let currentKeyword = ''; let currentMinScore = null; let currentMaxScore = null; let currentMinRank = null; let currentMaxRank = null; let currentResults = []; let sortField = ''; let sortDirection = 'asc'; ``` -------------------------------- ### Batch Demo Generation Configuration Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/26-cli-demo-generator.md Define multiple demos in a YAML configuration file for batch processing. This is useful for creating a series of related demonstrations. ```yaml demos: - name: "Install Demo" output: "install.gif" title: "Installation" theme: "Dracula" commands: - "npm install my-package" - "npm run build" - name: "Usage Demo" output: "usage.gif" commands: - "my-package --help" - "my-package run" ``` -------------------------------- ### List Available Marketplaces Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/29-claude-skills-troubleshooting.md Display a list of all registered Claude plugin marketplaces. ```bash claude plugin marketplace list ``` -------------------------------- ### Build iOS App for Simulator Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/25-developing-ios-apps.md Build your iOS application for a specific simulator. Ensure the simulator name is correct. ```bash xcodebuild -destination 'platform=iOS Simulator,name=iPhone 17' build ``` -------------------------------- ### Implementation Order for Multi-Item Feedback Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/11-receiving-code-review.md Defines the sequence for implementing feedback items, prioritizing critical issues and testing each fix individually. ```text For multi-item feedback: 1. Clarify anything unclear first 2. Then implement in this order: - Blocking issues (interruptions, security) - Simple fixes (typos, imports) - Complex fixes (refactors, logic) 3. Test each fix individually 4. Verify no regressions ``` -------------------------------- ### Run tests to verify failure Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/03-test-driven-development.md Execute the test suite to confirm that the newly written test fails as expected. This validates that the test is correctly set up to catch the absence of functionality. ```bash npm test path/to/test.test.ts ``` -------------------------------- ### Determine Worktree Path and Create Worktree Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/08-using-git-worktrees.md Determines the full path for the new worktree based on location preference and branch name, then creates and changes into the new worktree. ```bash # Determine the full path case $LOCATION in .worktrees|worktrees) path="$LOCATION/$BRANCH_NAME" ;; ~/.config/superpowers/worktrees/*) path="~/.config/superpowers/worktrees/$project/$BRANCH_NAME" ;; esac # Create worktree with a new branch git worktree add "$path" -b "$BRANCH_NAME" cd "$path" ``` -------------------------------- ### Convert Windows Path to WSL Path Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/17-markdown-tools.md Convert Windows file paths to their equivalent WSL paths using a helper script. This is useful for cross-environment file access. ```bash # Windows → WSL conversion C:\Users\name\file.pdf → /mnt/c/Users/name/file.pdf # Using the helper script python scripts/convert_path.py "C:\Users\name\Documents\file.pdf" ``` -------------------------------- ### Markdown Plan Structure Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/04-writing-plans.md This is the standard markdown structure for creating an implementation plan. It includes sections for overview, goals, prerequisites, tasks, verification, and rollback. ```markdown # [功能名称] 实施计划 ## 概述 [1-2段描述要实现什么以及为什么] ## 目标 - [目标1] - [目标2] - [目标3] ## 前提条件 - [条件1] - [条件2] ## 任务 ### Task 1: [任务名称] **优先级:** 高/中/低 **估算:** X小时 **步骤:** 1. [步骤1] 2. [步骤2] 3. [步骤3] **验收标准:** - [标准1] - [标准2] **依赖:** 无 / Task X ### Task 2: [任务名称] [相同格式...] ## 验证 - [验证步骤1] - [验证步骤2] ## 回退计划 如果遇到问题: 1. [回退步骤1] 2. [回退步骤2] ``` -------------------------------- ### Build iOS App via Command Line Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/25-developing-ios-apps.md Use xcodebuild to compile your iOS application from the command line. This is useful for automated builds and requires a paid developer account. ```bash xcodebuild \ -project App.xcodeproj \ -scheme App \ -destination 'platform=iOS,name=DeviceName' \ -allowProvisioningUpdates \ build ``` -------------------------------- ### Core Response Pattern for Code Reviews Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/11-receiving-code-review.md A step-by-step process for handling code review feedback, from reading to implementation. ```text When receiving code review feedback: 1. Read: Read the feedback in its entirety without reacting 2. Understand: Rephrase the request in your own words (or ask) 3. Validate: Check against code repository reality 4. Evaluate: Is this technically sound for this codebase? 5. Respond: Technologically confirm or reason back 6. Implement: One item at a time, testing each ``` -------------------------------- ### Requirements Verification Pattern Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/09-verification-before-completion.md When verifying that requirements are met, re-read the plan, create a checklist, verify each item, and then report any gaps or completion. Avoid simply stating 'tests passed, phase complete' without this detailed verification. ```text ✅ 重新阅读计划 → 创建检查表 → 验证每个 → 报告缺口或完成 ❌ "测试通过,阶段完成" ``` -------------------------------- ### Check if a framework is dynamic Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/25-developing-ios-apps.md Use the 'file' command to inspect a framework and determine if it's a dynamically linked shared library or a static archive. ```bash # Check if a framework is dynamic file ~/Library/Developer/Xcode/DerivedData/PROJECT-*/Build/Products/Debug-iphoneos/FRAMEWORK.framework/FRAMEWORK # Dynamic: "Mach-O 64-bit dynamically linked shared library" # Static: "current ar archive" ``` -------------------------------- ### Python: Empty Module Initialization Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/cleanup-report.md This Python code snippet from an __init__.py file indicates an empty module directory. The import statement references a class that does not exist in the project, suggesting the module is unused and can be safely removed. ```python # core/volunteer/__init__.py from .volunteer_manager import VolunteerManager ``` ```python # core/prediction/__init__.py from .rank_predictor import RankPredictor ``` -------------------------------- ### Check Enabled Plugins Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/29-claude-skills-troubleshooting.md Display the list of plugins that are currently enabled and active. Uses jq for filtering JSON output. ```bash cat ~/.claude/settings.json | jq '.enabledPlugins' ``` -------------------------------- ### Configure Git proxy for SPM dependencies Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/25-developing-ios-apps.md Set global Git HTTP and HTTPS proxy configurations to resolve Swift Package Manager dependencies through a proxy server. This is useful for network configurations like in China. ```bash git config --global http.proxy http://127.0.0.1:1082 git config --global https.proxy http://127.0.0.1:1082 xcodebuild -scmProvider system -resolvePackageDependencies ``` -------------------------------- ### Add New Skill to Marketplace Source: https://github.com/wonderslife/college-major4hs/blob/main/docs/12-skill-creator.md When adding a new skill, create an entry in the `.claude-plugin/marketplace.json` file. This entry includes metadata such as the skill's name, description, source path, and category. ```json { "name": "skill-name", "description": "从SKILL.md frontmatter description复制", "source": "./", "strict": false, "version": "1.0.0", "category": "developer-tools", "keywords": ["relevant", "keywords"], "skills": ["./skill-name"] } ```