[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M69BJNJQXB7WS6Q2WPYP8KVF":3,"skill-same:01M69BJNJQXB7WS6Q2WPYP8KVF":56},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":27,"linkOnly":28,"markdownContent":29,"markdownBody":30,"frontMatter":31,"refName":32,"commitSha":33,"skillDirectory":34,"forksCount":35,"repositoryHtmlUrl":36,"repositoryHomepageUrl":37,"ownerHtmlUrl":38,"ownerBlogUrl":39,"ownerDescription":40,"updatedAt":41,"install":42,"resources":55},"01M69BJNJQXB7WS6Q2WPYP8KVF","code-simplifier",null,"Analyzes recently modified code and creates pull requests with simplifications that improve clarity, consistency, and maintainability while preserving functionality","microsoft\u002Fghqr","microsoft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6154722?v=4","01M698VYDXZ6JW5WH3CRV650R8","Microsoft","01M69BJK9MTS2DEZ9YVEH9VX7X",530,"MIT","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fghqr\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fcode-simplifier\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[24,25,26],"code","code simplifier","pull requests","2026-11-10 10:12:30",false,"---\nname: code-simplifier\ndescription: Analyzes recently modified code and creates pull requests with simplifications that improve clarity, consistency, and maintainability while preserving functionality\n---\n\n# Code Simplifier Skill\n\nExpert guidance for analyzing and simplifying recently modified code to improve clarity, consistency, and maintainability while preserving exact functionality.\n\n## Overview\n\nThis skill enables agents to:\n- Analyze code changes from the last 24 hours\n- Apply targeted simplifications that improve code quality\n- Create pull requests with improvements\n- Validate changes through tests and linting\n\n## When to Use This Skill\n\nUse this skill when:\n- User asks to simplify or refactor recent code changes\n- User wants to improve code quality without changing functionality\n- User requests code review with automatic improvements\n- Scheduled code quality checks are needed\n\n## Simplification Principles\n\n### 1. Preserve Functionality\n- **NEVER** change what the code does - only how it does it\n- All original features, outputs, and behaviors must remain intact\n- Run tests before and after to ensure no behavioral changes\n\n### 2. Enhance Clarity\n- Reduce unnecessary complexity and nesting\n- Eliminate redundant code and abstractions\n- Improve readability through clear variable and function names\n- Consolidate related logic\n- Remove unnecessary comments that describe obvious code\n- **IMPORTANT**: Avoid nested ternary operators - prefer switch statements or if\u002Felse chains\n- Choose clarity over brevity - explicit code is often better than compact code\n\n### 3. Apply Project Standards\n- Use project-specific conventions and patterns\n- Follow established naming conventions\n- Apply consistent formatting\n- Use appropriate language features (modern syntax where beneficial)\n\n### 4. Maintain Balance\nAvoid over-simplification that could:\n- Reduce code clarity or maintainability\n- Create overly clever solutions that are hard to understand\n- Combine too many concerns into single functions\n- Remove helpful abstractions that improve code organization\n- Prioritize \"fewer lines\" over readability\n- Make the code harder to debug or extend\n\n## Workflow\n\n### Phase 1: Identify Recently Modified Code\n\n#### 1.1 Find Recent Changes\n\nIdentify files modified in the last 24 hours from **all sources**:\n\n**Option A: Local File Changes (filesystem-based)**\n```bash\n# Find files modified in the last 24 hours (includes uncommitted changes)\nfind . -type f -mtime -1 -not -path '.\u002F.git\u002F*' -not -path '.\u002Fnode_modules\u002F*' -not -path '.\u002Fvendor\u002F*'\n\n# Or using git to find modified files (staged and unstaged)\ngit status --porcelain\n\n# Find recently modified tracked files\ngit diff --name-only HEAD~10  # Adjust based on commit frequency\n```\n\n**Option B: Git History (committed changes)**\n```bash\n# Get yesterday's date in ISO format\nYESTERDAY=$(date -d '1 day ago' '+%Y-%m-%d' 2>\u002Fdev\u002Fnull || date -v-1d '+%Y-%m-%d')\n\n# List recent commits\ngit log --since=\"24 hours ago\" --pretty=format:\"%H %s\" --no-merges\n\n# List files changed in recent commits\ngit log --since=\"24 hours ago\" --name-only --pretty=format:\"\" | sort -u\n```\n\n**Option C: GitHub PRs and Commits (remote changes)**\n\nUse GitHub tools to:\n- Search for pull requests merged in the last 24 hours\n- Get details of merged PRs to understand what files were changed\n- List commits from the last 24 hours to identify modified files\n\n**Combine all sources** to get a comprehensive list of recently modified files.\n\n#### 1.2 Extract Changed Files\n\nFrom all identified sources (local changes, commits, PRs):\n- Collect files modified on the filesystem in the last 24 hours\n- List changed files from recent commits\n- List changed files from merged PRs\n- **Deduplicate** the combined file list\n- Focus on source code files (`.go`, `.js`, `.ts`, `.tsx`, `.jsx`, `.py`, `.rb`, `.java`, `.cs`, `.php`, `.cpp`, `.c`, `.rs`, etc.)\n- Exclude test files, lock files, generated files, and vendored dependencies\n\n```bash\n# Example: Combine filesystem and git changes, filter source files\n{\n  find . -type f -mtime -1 -not -path '.\u002F.git\u002F*' 2>\u002Fdev\u002Fnull\n  git log --since=\"24 hours ago\" --name-only --pretty=format:\"\" 2>\u002Fdev\u002Fnull\n  git diff --name-only 2>\u002Fdev\u002Fnull\n} | sort -u | grep -E '\\.(go|js|ts|tsx|jsx|py|rb|java|cs|php|cpp|c|rs)$'\n```\n\n#### 1.3 Determine Scope\n\nIf **no files were changed in the last 24 hours** (no local modifications, no commits, no merged PRs), exit gracefully:\n\n```\n✅ No code changes detected in the last 24 hours.\nCode simplifier has nothing to process today.\n```\n\nIf **files were changed** (from any source: local edits, commits, or PRs), proceed to Phase 2.\n\n### Phase 2: Analyze and Simplify Code\n\n#### 2.1 Review Project Standards\n\nBefore simplifying, review the project's coding standards:\n- Check for style guides, coding conventions, or contribution guidelines\n- Look for language-specific conventions (`STYLE.md`, `CONTRIBUTING.md`, `README.md`)\n- Identify established patterns in the codebase\n\n#### 2.2 Perform Code Analysis\n\nFor each changed file:\n\n1. **Read the file contents**\n2. **Identify refactoring opportunities**:\n   - Long functions that could be split\n   - Duplicate code patterns\n   - Complex conditionals that could be simplified\n   - Unclear variable names\n   - Missing or excessive comments\n   - Non-idiomatic patterns\n3. **Design the simplification**:\n   - What specific changes will improve clarity?\n   - How can complexity be reduced?\n   - What patterns should be applied?\n   - Will this maintain all functionality?\n\n#### 2.3 Apply Simplifications\n\nMake surgical, focused changes that preserve all original behavior. Use targeted edits rather than full file rewrites.\n\n### Phase 3: Validate Changes\n\n#### 3.1 Run Tests\n\nAfter making simplifications, run the project's test suite:\n\n```bash\n# Common test commands (adapt to the project)\nmake test          # If Makefile exists\nnpm test           # For Node.js projects\npytest             # For Python projects\n.\u002Fgradlew test     # For Gradle projects\nmvn test           # For Maven projects\ncargo test         # For Rust projects\ngo test .\u002F...      # For Go projects\n```\n\nIf tests fail:\n- Review the failures carefully\n- Revert changes that broke functionality\n- Adjust simplifications to preserve behavior\n- Re-run tests until they pass\n\n#### 3.2 Run Linters\n\nEnsure code style is consistent:\n\n```bash\n# Common lint commands (adapt to the project)\nmake lint          # If Makefile exists\nnpm run lint       # For Node.js projects\npylint . || flake8 . # For Python projects\ncargo clippy       # For Rust projects\ngolangci-lint run  # For Go projects\n```\n\nFix any linting issues introduced by the simplifications.\n\n#### 3.3 Check Build\n\nVerify the project still builds successfully:\n\n```bash\n# Common build commands (adapt to the project)\nmake build         # If Makefile exists\nnpm run build      # For Node.js projects\n.\u002Fgradlew build    # For Gradle projects\nmvn package        # For Maven projects\ncargo build        # For Rust projects\ngo build .\u002F...     # For Go projects\n```\n\n### Phase 4: Create Pull Request\n\n#### 4.1 Determine If PR Is Needed\n\nOnly create a PR if:\n- ✅ Actual code simplifications were made\n- ✅ All tests pass (or no tests exist)\n- ✅ Linting is clean (or no linter configured)\n- ✅ Build succeeds (or no build step exists)\n- ✅ Changes improve code quality without breaking functionality\n\nIf no improvements were made or changes broke tests, exit gracefully:\n\n```\n✅ Code analyzed from last 24 hours.\nNo simplifications needed - code already meets quality standards.\n```\n\n#### 4.2 Generate PR Description\n\nUse this structure for the PR:\n\n```markdown\n## Code Simplification - [Date]\n\nThis PR simplifies recently modified code to improve clarity, consistency, and maintainability while preserving all functionality.\n\n### Files Simplified\n\n- `path\u002Fto\u002Ffile1.ext` - [Brief description of improvements]\n- `path\u002Fto\u002Ffile2.ext` - [Brief description of improvements]\n\n### Improvements Made\n\n1. **Reduced Complexity**\n   - [Specific example]\n\n2. **Enhanced Clarity**\n   - [Specific example]\n\n3. **Applied Project Standards**\n   - [Specific example]\n\n### Changes Based On\n\nRecent changes from:\n- #[PR_NUMBER] - [PR title]\n- Commit [SHORT_SHA] - [Commit message]\n\n### Testing\n\n- ✅ All tests pass (or indicate if no tests exist)\n- ✅ Linting passes (or indicate if no linter configured)\n- ✅ Build succeeds (or indicate if no build step)\n- ✅ No functional changes - behavior is identical\n\n### Review Focus\n\nPlease verify:\n- Functionality is preserved\n- Simplifications improve code quality\n- Changes align with project conventions\n- No unintended side effects\n\n---\n\n*Automated by Code Simplifier Agent*\n```\n\n## Common Simplification Patterns\n\n### Reduce Nesting\n```go\n\u002F\u002F Before\nfunc process(data []Item) error {\n    if data != nil {\n        if len(data) > 0 {\n            for _, item := range data {\n                if item.Valid {\n                    \u002F\u002F process\n                }\n            }\n        }\n    }\n    return nil\n}\n\n\u002F\u002F After\nfunc process(data []Item) error {\n    if len(data) == 0 {\n        return nil\n    }\n    for _, item := range data {\n        if !item.Valid {\n            continue\n        }\n        \u002F\u002F process\n    }\n    return nil\n}\n```\n\n### Replace Nested Ternaries with Switch\u002FIf\n```javascript\n\u002F\u002F Before\nconst status = isError ? 'error' : isLoading ? 'loading' : isSuccess ? 'success' : 'idle';\n\n\u002F\u002F After\nlet status;\nif (isError) {\n    status = 'error';\n} else if (isLoading) {\n    status = 'loading';\n} else if (isSuccess) {\n    status = 'success';\n} else {\n    status = 'idle';\n}\n```\n\n### Consolidate Related Logic\n```python\n# Before\ndef validate_user(user):\n    if user.name is None:\n        return False\n    if len(user.name) == 0:\n        return False\n    if user.email is None:\n        return False\n    if '@' not in user.email:\n        return False\n    return True\n\n# After\ndef validate_user(user):\n    if not user.name:\n        return False\n    if not user.email or '@' not in user.email:\n        return False\n    return True\n```\n\n### Improve Variable Names\n```go\n\u002F\u002F Before\nfunc calc(d []int) int {\n    t := 0\n    for _, v := range d {\n        t += v\n    }\n    return t\n}\n\n\u002F\u002F After\nfunc calculateSum(values []int) int {\n    total := 0\n    for _, value := range values {\n        total += value\n    }\n    return total\n}\n```\n\n## Scope Control Guidelines\n\n- **Focus on recent changes**: Only refine code modified in the last 24 hours (local files, commits, or merged PRs)\n- **Include all change sources**: Consider filesystem modifications, staged changes, commits, and merged PRs\n- **Don't over-refactor**: Avoid touching unrelated code\n- **Preserve interfaces**: Don't change public APIs\n- **Incremental improvements**: Make targeted, surgical changes\n\n## Exit Conditions\n\nExit gracefully without creating a PR if:\n- No code was changed in the last 24 hours\n- No simplifications are beneficial\n- Tests fail after changes\n- Build fails after changes\n- Changes are too risky or complex\n\n## Quality Checklist\n\nBefore creating a PR, verify:\n\n- [ ] Functionality is preserved (all tests pass)\n- [ ] Code is clearer and more readable\n- [ ] No nested ternary operators introduced\n- [ ] Variable names are descriptive\n- [ ] Unnecessary complexity removed\n- [ ] Project conventions followed\n- [ ] Build succeeds\n- [ ] Linting passes\n- [ ] Changes are focused and surgical\n\n## Output Requirements\n\nThe agent MUST either:\n\n1. **If no changes in last 24 hours**: Output a brief status message\n2. **If no simplifications beneficial**: Output a brief status message\n3. **If simplifications made**: Create a PR with the changes and detailed description\n","# Code Simplifier Skill\n\nExpert guidance for analyzing and simplifying recently modified code to improve clarity, consistency, and maintainability while preserving exact functionality.\n\n## Overview\n\nThis skill enables agents to:\n- Analyze code changes from the last 24 hours\n- Apply targeted simplifications that improve code quality\n- Create pull requests with improvements\n- Validate changes through tests and linting\n\n## When to Use This Skill\n\nUse this skill when:\n- User asks to simplify or refactor recent code changes\n- User wants to improve code quality without changing functionality\n- User requests code review with automatic improvements\n- Scheduled code quality checks are needed\n\n## Simplification Principles\n\n### 1. Preserve Functionality\n- **NEVER** change what the code does - only how it does it\n- All original features, outputs, and behaviors must remain intact\n- Run tests before and after to ensure no behavioral changes\n\n### 2. Enhance Clarity\n- Reduce unnecessary complexity and nesting\n- Eliminate redundant code and abstractions\n- Improve readability through clear variable and function names\n- Consolidate related logic\n- Remove unnecessary comments that describe obvious code\n- **IMPORTANT**: Avoid nested ternary operators - prefer switch statements or if\u002Felse chains\n- Choose clarity over brevity - explicit code is often better than compact code\n\n### 3. Apply Project Standards\n- Use project-specific conventions and patterns\n- Follow established naming conventions\n- Apply consistent formatting\n- Use appropriate language features (modern syntax where beneficial)\n\n### 4. Maintain Balance\nAvoid over-simplification that could:\n- Reduce code clarity or maintainability\n- Create overly clever solutions that are hard to understand\n- Combine too many concerns into single functions\n- Remove helpful abstractions that improve code organization\n- Prioritize \"fewer lines\" over readability\n- Make the code harder to debug or extend\n\n## Workflow\n\n### Phase 1: Identify Recently Modified Code\n\n#### 1.1 Find Recent Changes\n\nIdentify files modified in the last 24 hours from **all sources**:\n\n**Option A: Local File Changes (filesystem-based)**\n```bash\n# Find files modified in the last 24 hours (includes uncommitted changes)\nfind . -type f -mtime -1 -not -path '.\u002F.git\u002F*' -not -path '.\u002Fnode_modules\u002F*' -not -path '.\u002Fvendor\u002F*'\n\n# Or using git to find modified files (staged and unstaged)\ngit status --porcelain\n\n# Find recently modified tracked files\ngit diff --name-only HEAD~10  # Adjust based on commit frequency\n```\n\n**Option B: Git History (committed changes)**\n```bash\n# Get yesterday's date in ISO format\nYESTERDAY=$(date -d '1 day ago' '+%Y-%m-%d' 2>\u002Fdev\u002Fnull || date -v-1d '+%Y-%m-%d')\n\n# List recent commits\ngit log --since=\"24 hours ago\" --pretty=format:\"%H %s\" --no-merges\n\n# List files changed in recent commits\ngit log --since=\"24 hours ago\" --name-only --pretty=format:\"\" | sort -u\n```\n\n**Option C: GitHub PRs and Commits (remote changes)**\n\nUse GitHub tools to:\n- Search for pull requests merged in the last 24 hours\n- Get details of merged PRs to understand what files were changed\n- List commits from the last 24 hours to identify modified files\n\n**Combine all sources** to get a comprehensive list of recently modified files.\n\n#### 1.2 Extract Changed Files\n\nFrom all identified sources (local changes, commits, PRs):\n- Collect files modified on the filesystem in the last 24 hours\n- List changed files from recent commits\n- List changed files from merged PRs\n- **Deduplicate** the combined file list\n- Focus on source code files (`.go`, `.js`, `.ts`, `.tsx`, `.jsx`, `.py`, `.rb`, `.java`, `.cs`, `.php`, `.cpp`, `.c`, `.rs`, etc.)\n- Exclude test files, lock files, generated files, and vendored dependencies\n\n```bash\n# Example: Combine filesystem and git changes, filter source files\n{\n  find . -type f -mtime -1 -not -path '.\u002F.git\u002F*' 2>\u002Fdev\u002Fnull\n  git log --since=\"24 hours ago\" --name-only --pretty=format:\"\" 2>\u002Fdev\u002Fnull\n  git diff --name-only 2>\u002Fdev\u002Fnull\n} | sort -u | grep -E '\\.(go|js|ts|tsx|jsx|py|rb|java|cs|php|cpp|c|rs)$'\n```\n\n#### 1.3 Determine Scope\n\nIf **no files were changed in the last 24 hours** (no local modifications, no commits, no merged PRs), exit gracefully:\n\n```\n✅ No code changes detected in the last 24 hours.\nCode simplifier has nothing to process today.\n```\n\nIf **files were changed** (from any source: local edits, commits, or PRs), proceed to Phase 2.\n\n### Phase 2: Analyze and Simplify Code\n\n#### 2.1 Review Project Standards\n\nBefore simplifying, review the project's coding standards:\n- Check for style guides, coding conventions, or contribution guidelines\n- Look for language-specific conventions (`STYLE.md`, `CONTRIBUTING.md`, `README.md`)\n- Identify established patterns in the codebase\n\n#### 2.2 Perform Code Analysis\n\nFor each changed file:\n\n1. **Read the file contents**\n2. **Identify refactoring opportunities**:\n   - Long functions that could be split\n   - Duplicate code patterns\n   - Complex conditionals that could be simplified\n   - Unclear variable names\n   - Missing or excessive comments\n   - Non-idiomatic patterns\n3. **Design the simplification**:\n   - What specific changes will improve clarity?\n   - How can complexity be reduced?\n   - What patterns should be applied?\n   - Will this maintain all functionality?\n\n#### 2.3 Apply Simplifications\n\nMake surgical, focused changes that preserve all original behavior. Use targeted edits rather than full file rewrites.\n\n### Phase 3: Validate Changes\n\n#### 3.1 Run Tests\n\nAfter making simplifications, run the project's test suite:\n\n```bash\n# Common test commands (adapt to the project)\nmake test          # If Makefile exists\nnpm test           # For Node.js projects\npytest             # For Python projects\n.\u002Fgradlew test     # For Gradle projects\nmvn test           # For Maven projects\ncargo test         # For Rust projects\ngo test .\u002F...      # For Go projects\n```\n\nIf tests fail:\n- Review the failures carefully\n- Revert changes that broke functionality\n- Adjust simplifications to preserve behavior\n- Re-run tests until they pass\n\n#### 3.2 Run Linters\n\nEnsure code style is consistent:\n\n```bash\n# Common lint commands (adapt to the project)\nmake lint          # If Makefile exists\nnpm run lint       # For Node.js projects\npylint . || flake8 . # For Python projects\ncargo clippy       # For Rust projects\ngolangci-lint run  # For Go projects\n```\n\nFix any linting issues introduced by the simplifications.\n\n#### 3.3 Check Build\n\nVerify the project still builds successfully:\n\n```bash\n# Common build commands (adapt to the project)\nmake build         # If Makefile exists\nnpm run build      # For Node.js projects\n.\u002Fgradlew build    # For Gradle projects\nmvn package        # For Maven projects\ncargo build        # For Rust projects\ngo build .\u002F...     # For Go projects\n```\n\n### Phase 4: Create Pull Request\n\n#### 4.1 Determine If PR Is Needed\n\nOnly create a PR if:\n- ✅ Actual code simplifications were made\n- ✅ All tests pass (or no tests exist)\n- ✅ Linting is clean (or no linter configured)\n- ✅ Build succeeds (or no build step exists)\n- ✅ Changes improve code quality without breaking functionality\n\nIf no improvements were made or changes broke tests, exit gracefully:\n\n```\n✅ Code analyzed from last 24 hours.\nNo simplifications needed - code already meets quality standards.\n```\n\n#### 4.2 Generate PR Description\n\nUse this structure for the PR:\n\n```markdown\n## Code Simplification - [Date]\n\nThis PR simplifies recently modified code to improve clarity, consistency, and maintainability while preserving all functionality.\n\n### Files Simplified\n\n- `path\u002Fto\u002Ffile1.ext` - [Brief description of improvements]\n- `path\u002Fto\u002Ffile2.ext` - [Brief description of improvements]\n\n### Improvements Made\n\n1. **Reduced Complexity**\n   - [Specific example]\n\n2. **Enhanced Clarity**\n   - [Specific example]\n\n3. **Applied Project Standards**\n   - [Specific example]\n\n### Changes Based On\n\nRecent changes from:\n- #[PR_NUMBER] - [PR title]\n- Commit [SHORT_SHA] - [Commit message]\n\n### Testing\n\n- ✅ All tests pass (or indicate if no tests exist)\n- ✅ Linting passes (or indicate if no linter configured)\n- ✅ Build succeeds (or indicate if no build step)\n- ✅ No functional changes - behavior is identical\n\n### Review Focus\n\nPlease verify:\n- Functionality is preserved\n- Simplifications improve code quality\n- Changes align with project conventions\n- No unintended side effects\n\n---\n\n*Automated by Code Simplifier Agent*\n```\n\n## Common Simplification Patterns\n\n### Reduce Nesting\n```go\n\u002F\u002F Before\nfunc process(data []Item) error {\n    if data != nil {\n        if len(data) > 0 {\n            for _, item := range data {\n                if item.Valid {\n                    \u002F\u002F process\n                }\n            }\n        }\n    }\n    return nil\n}\n\n\u002F\u002F After\nfunc process(data []Item) error {\n    if len(data) == 0 {\n        return nil\n    }\n    for _, item := range data {\n        if !item.Valid {\n            continue\n        }\n        \u002F\u002F process\n    }\n    return nil\n}\n```\n\n### Replace Nested Ternaries with Switch\u002FIf\n```javascript\n\u002F\u002F Before\nconst status = isError ? 'error' : isLoading ? 'loading' : isSuccess ? 'success' : 'idle';\n\n\u002F\u002F After\nlet status;\nif (isError) {\n    status = 'error';\n} else if (isLoading) {\n    status = 'loading';\n} else if (isSuccess) {\n    status = 'success';\n} else {\n    status = 'idle';\n}\n```\n\n### Consolidate Related Logic\n```python\n# Before\ndef validate_user(user):\n    if user.name is None:\n        return False\n    if len(user.name) == 0:\n        return False\n    if user.email is None:\n        return False\n    if '@' not in user.email:\n        return False\n    return True\n\n# After\ndef validate_user(user):\n    if not user.name:\n        return False\n    if not user.email or '@' not in user.email:\n        return False\n    return True\n```\n\n### Improve Variable Names\n```go\n\u002F\u002F Before\nfunc calc(d []int) int {\n    t := 0\n    for _, v := range d {\n        t += v\n    }\n    return t\n}\n\n\u002F\u002F After\nfunc calculateSum(values []int) int {\n    total := 0\n    for _, value := range values {\n        total += value\n    }\n    return total\n}\n```\n\n## Scope Control Guidelines\n\n- **Focus on recent changes**: Only refine code modified in the last 24 hours (local files, commits, or merged PRs)\n- **Include all change sources**: Consider filesystem modifications, staged changes, commits, and merged PRs\n- **Don't over-refactor**: Avoid touching unrelated code\n- **Preserve interfaces**: Don't change public APIs\n- **Incremental improvements**: Make targeted, surgical changes\n\n## Exit Conditions\n\nExit gracefully without creating a PR if:\n- No code was changed in the last 24 hours\n- No simplifications are beneficial\n- Tests fail after changes\n- Build fails after changes\n- Changes are too risky or complex\n\n## Quality Checklist\n\nBefore creating a PR, verify:\n\n- [ ] Functionality is preserved (all tests pass)\n- [ ] Code is clearer and more readable\n- [ ] No nested ternary operators introduced\n- [ ] Variable names are descriptive\n- [ ] Unnecessary complexity removed\n- [ ] Project conventions followed\n- [ ] Build succeeds\n- [ ] Linting passes\n- [ ] Changes are focused and surgical\n\n## Output Requirements\n\nThe agent MUST either:\n\n1. **If no changes in last 24 hours**: Output a brief status message\n2. **If no simplifications beneficial**: Output a brief status message\n3. **If simplifications made**: Create a PR with the changes and detailed description\n",{"name":5,"description":7},"main","2cd3036ea0c58afaafd4d3763e9b64654f1e63a6",".github\u002Fskills\u002Fcode-simplifier",36,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fghqr","https:\u002F\u002Fmicrosoft.github.io\u002Fghqr\u002F","https:\u002F\u002Fgithub.com\u002Fmicrosoft","https:\u002F\u002Fopensource.microsoft.com","Open source projects and samples from Microsoft","2026-11-11 16:54:39",{"source":8,"skillName":5,"commands":43,"prompt":53,"zipAvailable":54},[44,47,50],{"tool":45,"command":46},"npx","npx skills add microsoft\u002Fghqr --skill code-simplifier",{"tool":48,"command":49},"bunx","bunx skills add microsoft\u002Fghqr --skill code-simplifier",{"tool":51,"command":52},"pnpm","pnpm dlx skills add microsoft\u002Fghqr --skill code-simplifier","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fghqr\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fcode-simplifier\u002FSKILL.md",true,[],[57,72,90],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":64,"publishedAt":27},"01M69BJZ29V4C6KDDK555QFHRZ","tui-developer","Generate Go Bubble Tea TUI applications with chat-like interfaces. Use when the user asks to create terminal UIs, chat interfaces, interactive CLI, REPLs, or log viewers. Follow the specified architecture and implementation requirements for consistent results.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fghqr\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Ftui-developer\u002FSKILL.md",[63],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[65,66,67,68,69,70,71],"tui developer","architecture","go","terminal","generate","cli","create",{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":81,"publishedAt":27},"01M69BJW1WNZWXM2KB6C2ESYTS","ghqr-report","Generate an executive assessment report from GitHub Quick Review (ghqr) scan data. Produces an executive summary, a dedicated section per validated subject with all findings, and a prioritized 30\u002F60\u002F90-day remediation plan. Use when the user asks for a report, executive summary, best practices posture overview, or a remediation roadmap from ghqr scan results.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fghqr\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fghqr-report\u002FSKILL.md",[78],{"categoryNo":79,"categoryName":80,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000034","行政与办公人员",[82,83,84,85,86,87,69,88,89],"ghqr","report","ghqr report","review","executive summary","best practices","github","assessment",{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":101,"publishedAt":27},"01M69BJRYGJPA08NHF6YEAXG94","copilot-sdk","Build agentic applications with GitHub Copilot SDK. Use when embedding AI agents in apps, creating custom tools, implementing streaming responses, managing sessions, connecting to MCP servers, or creating custom agents. Triggers on Copilot SDK, GitHub SDK, agentic app, embed Copilot, programmable agent, MCP server, custom agent.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fghqr\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fcopilot-sdk\u002FSKILL.md",[96],{"categoryNo":97,"categoryName":98,"taxonomyType":99,"taxonomyTypeDesc":100},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[102,103,104,105,106,107,108,109,88,110],"copilot sdk","copilot","sdk","ai agents","mcp server","agentic","MCP","sessions","github copilot"]