AgentSkillsCN

config

查看或更新思维项目配置。可修改测试、构建、代码检查等命令,调整分支规范或其他项目设置。当用户提出“更改配置”“更新设置”“设定测试命令”,或希望对项目搭建进行微调时,即可启用此功能。

SKILL.md
--- frontmatter
name: config
description: View or update cogitation project configuration. Modify test/build/lint commands, branching conventions, or other project settings. Use when user says "change config", "update settings", "set test command", or wants to modify project setup.

Configure Cogitation

View or update project configuration stored in EC.

Announce: "I'm using the config skill to manage project settings."

The Flow

code
Load Current → Present → Modify → Save → Verify

Step 1: Load Current Configuration

code
ec_search:
  query: project config
  type: config
  area: project

If no config found:

"No configuration found. Want to initialize cogitation for this project?"

If yes → Use @init

Step 2: Present Current Settings

markdown
## Current Configuration

| Setting | Value |
|---------|-------|
| Test command | `pnpm test` |
| Lint command | `pnpm lint` |
| Build command | `pnpm build` |
| Branch convention | `feat/fix/chore` |

What would you like to change?

Step 3: Modify Settings

Use AskUserQuestion:

json
{
  "questions": [{
    "question": "Which setting do you want to modify?",
    "header": "Setting",
    "options": [
      { "label": "Test command", "description": "Command to run tests" },
      { "label": "Lint command", "description": "Command to check types/lint" },
      { "label": "Build command", "description": "Command to build project" },
      { "label": "Branch convention", "description": "How branches are named" }
    ],
    "multiSelect": true
  }]
}

For each selected setting, ask for the new value:

json
{
  "questions": [{
    "question": "What should the test command be?",
    "header": "Test",
    "options": [
      { "label": "pnpm test", "description": "pnpm package manager" },
      { "label": "npm test", "description": "npm package manager" },
      { "label": "go test ./...", "description": "Go testing" },
      { "label": "cargo test", "description": "Rust testing" }
    ],
    "multiSelect": false
  }]
}

Step 4: Save Updated Configuration

  1. Invalidate old config:
code
ec_invalidate:
  id: <old_config_id>
  1. Store new config:
code
ec_add:
  type: config
  area: project
  content: |
    test_command: <new value>
    lint_command: <new value>
    build_command: <new value>
    branch_convention: <new value>
  rationale: Updated project configuration

Step 5: Verify

Configuration Updated

SettingOldNew
Testpnpm testnpm test

Changes take effect immediately for all cogitation skills.

Quick Commands

For fast updates, users can specify directly:

  • "Set test command to go test ./..."
  • "Change lint to npm run lint"
  • "Use feat/bugfix branching"

Parse the intent and update accordingly without full Q&A flow.

Configuration Reference

Test Commands

StackCommon Commands
Nodenpm test, pnpm test, yarn test, bun test
Gogo test ./..., go test -v ./...
Rustcargo test
Pythonpytest, python -m pytest

Lint Commands

StackCommon Commands
Nodenpm run lint, pnpm lint, eslint .
Gogo vet ./..., golangci-lint run
Rustcargo clippy
Pythonruff check ., flake8

Build Commands

StackCommon Commands
Nodenpm run build, pnpm build, tsc
Gogo build ./..., go build ./cmd/...
Rustcargo build
PythonUsually none needed

Branch Conventions

StyleExample
feat/fix/chorefeat/add-auth, fix/login-bug, chore/update-deps
feature/bugfixfeature/user-auth, bugfix/session-timeout
Flatadd-user-authentication, fix-login-issue