{"owner":"chaitin","repo":"PandaWiki","hasSkills":true,"totalSkillsCount":7,"totalTokensCount":2976,"categories":["anthropic-skill","root-instruction"],"hasMcp":false,"mcpConfig":null,"found":["web/packages/icons/package.json","web/packages/icons/tsconfig.json","web/packages/ui/package.json","web/packages/themes/package.json","web/packages/themes/tsconfig.json","web/packages/ui/tsconfig.json","AGENTS.md"],"skills":{"web/packages/icons/package.json":"{\n  \"name\": \"@panda-wiki/icons\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"./src/index.tsx\",\n  \"type\": \"module\",\n  \"scripts\": {\n    \"icon\": \"tsx ./scripts/generate.ts\"\n  },\n  \"exports\": {\n    \".\": \"./src/index.tsx\",\n    \"./*\": \"./src/*.tsx\"\n  },\n  \"keywords\": [],\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"packageManager\": \"pnpm@10.12.1\",\n  \"devDependencies\": {\n    \"tsx\": \"^4.20.5\"\n  }\n}\n","web/packages/icons/tsconfig.json":"{\n  \"extends\": \"../../tsconfig.base.json\",\n  \"compilerOptions\": {\n    /* Icons 图标库特有配置 */\n    \"baseUrl\": \".\",\n    \"paths\": {\n      \"@/*\": [\"src/*\"]\n    },\n    \"tsBuildInfoFile\": \"./node_modules/.tmp/tsconfig.tsbuildinfo\",\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"allowImportingTsExtensions\": true,\n    \"moduleDetection\": \"force\",\n    \"jsx\": \"react-jsx\",\n    \"allowJs\": true,\n    \"esModuleInterop\": true,\n    \"resolveJsonModule\": true\n  },\n  \"include\": [\"src\", \"scripts\"],\n  \"exclude\": [\"node_modules\", \"dist\"]\n}\n","web/packages/ui/package.json":"{\n  \"name\": \"@panda-wiki/ui\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"./src/index.tsx\",\n  \"type\": \"module\",\n  \"types\": \"env.d.ts\",\n  \"scripts\": {\n    \"icon\": \"tsx ./scripts/generate.ts\"\n  },\n  \"exports\": {\n    \".\": \"./src/index.tsx\",\n    \"./*\": \"./src/*/index.tsx\"\n  },\n  \"typesVersions\": {\n    \"*\": {\n      \"*\": [\n        \"src/*/index.tsx\",\n        \"src/*.tsx\"\n      ]\n    }\n  },\n  \"keywords\": [],\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"packageManager\": \"pnpm@10.12.1\",\n  \"dependencies\": {\n    \"gsap\": \"^3.13.0\",\n    \"swiper\": \"^12.0.2\"\n  }\n}\n","web/packages/themes/package.json":"{\n  \"name\": \"@panda-wiki/themes\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"./src/index.ts\",\n  \"type\": \"module\",\n  \"types\": \"./theme.d.ts\",\n  \"exports\": {\n    \".\": \"./src/index.ts\",\n    \"./*\": \"./src/*.ts\",\n    \"./types\": \"./theme.d.ts\"\n  },\n  \"keywords\": [],\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"packageManager\": \"pnpm@10.12.1\"\n}\n","web/packages/themes/tsconfig.json":"{\n  \"extends\": \"../../tsconfig.base.json\",\n  \"compilerOptions\": {\n    /* Themes 主题库特有配置 */\n    \"baseUrl\": \".\",\n    \"paths\": {\n      \"@/*\": [\"src/*\"]\n    },\n    \"tsBuildInfoFile\": \"./node_modules/.tmp/tsconfig.tsbuildinfo\",\n    \"target\": \"ES2020\",\n    \"lib\": [\"ES2020\"],\n    \"allowImportingTsExtensions\": true,\n    \"moduleDetection\": \"force\",\n    \"esModuleInterop\": true,\n    \"resolveJsonModule\": true,\n    \"declaration\": true,\n    \"declarationMap\": true\n  },\n  \"include\": [\"src\", \"theme.d.ts\"],\n  \"exclude\": [\"node_modules\", \"dist\"]\n}\n","web/packages/ui/tsconfig.json":"{\n  \"extends\": \"../../tsconfig.base.json\",\n  \"compilerOptions\": {\n    /* UI 组件库特有配置 */\n    \"baseUrl\": \".\",\n    \"paths\": {\n      \"@/*\": [\"src/*\"]\n    },\n    \"tsBuildInfoFile\": \"./node_modules/.tmp/tsconfig.app.tsbuildinfo\",\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"allowImportingTsExtensions\": true,\n    \"moduleDetection\": \"force\",\n    \"jsx\": \"react-jsx\",\n    \"allowJs\": true,\n    \"esModuleInterop\": true,\n    \"resolveJsonModule\": true,\n\n    /* Linting */\n    \"noUnusedLocals\": false,\n    \"noUnusedParameters\": false,\n    \"noFallthroughCasesInSwitch\": true,\n    \"noUncheckedSideEffectImports\": true\n  },\n  \"include\": [\"src\", \"env.d.ts\"]\n}\n","AGENTS.md":"# AGENTS.md\n\nThis file is for coding agents working in `PandaWiki`.\nPrefer small, targeted changes that match the repository's existing patterns.\nCommunicate with the user in Chinese unless they explicitly ask otherwise.\n\n## Source Of Truth\n\n- There is no existing `AGENTS.md` in this repository.\n- No Cursor rules were found in `.cursor/rules/` or `.cursorrules`.\n- No Copilot instructions were found in `.github/copilot-instructions.md`.\n- Root `CLAUDE.md` exists and should be treated as repository guidance.\n- Key note from `CLAUDE.md`: respect backend layer boundaries and use Chinese for communication.\n\n## Repository Layout\n\n- `backend/`: Go backend services, APIs, workers, migrations, docs.\n- `web/`: pnpm workspace for frontend apps.\n- `web/admin/`: React + Vite admin console.\n- `web/app/`: Next.js user-facing web app.\n- `sdk/`: SDK-related code.\n\n## Architecture Expectations\n\n- Backend follows a layered structure.\n- Put business logic in `backend/usecase/`.\n- Keep HTTP-specific logic in `backend/handler/`.\n- Keep persistence and external data access in `backend/repo/`.\n- Put shared request/response and domain models in `backend/domain/` and `backend/api/`.\n- Do not move business rules into handlers just to finish a feature quickly.\n\n## Tooling Versions And Basics\n\n- Go version: `1.24.3` from `backend/go.mod`.\n- Frontend package manager: `pnpm` only.\n- Admin app build tool: Vite.\n- User app build tool: Next.js.\n- Backend formatting/linting is driven by `gofmt`, `goimports`, and `golangci-lint`.\n- Frontend formatting is primarily Prettier.\n\n## Install Commands\n\nRun these from the repository root unless noted otherwise.\n\n### Backend\n\n- Install Go dependencies: `cd backend && go mod tidy`\n- Build all backend packages: `cd backend && go build ./...`\n\n### Frontend\n\n- Install web dependencies: `cd web && pnpm install`\n- Start both frontend apps: `cd web && pnpm dev`\n\n## Build Commands\n\n### Backend\n\n- Build all packages: `cd backend && go build ./...`\n- Build one package: `cd backend && go build ./usecase`\n- Generate swagger/wire code: `cd backend && make generate`\n- Generate pro swagger/wire code: `cd backend && make generate_pro`\n\n### Frontend\n\n- Build all web apps: `cd web && pnpm build`\n- Build admin only: `cd web/admin && pnpm build`\n- Build app only: `cd web/app && pnpm build`\n- Analyze admin build: `cd web/admin && pnpm build:analyze`\n\n## Test Commands\n\n### Backend\n\n- Run all tests: `cd backend && go test ./...`\n- Run one package: `cd backend && go test ./usecase`\n- Run one test by name in one package: `cd backend && go test ./usecase -run TestName`\n- Run one test with verbose output: `cd backend && go test ./usecase -run TestName -v`\n- Run one package with race detector when needed: `cd backend && go test -race ./usecase`\n\n### Frontend\n\n- `web/admin` currently has no dedicated test script in `package.json`.\n- `web/app` currently has no dedicated test script in `package.json`.\n- For frontend verification, use lint, typecheck, and build as the practical test substitute.\n- Admin typecheck via build pipeline: `cd web/admin && pnpm build`\n- App lint: `cd web/app && pnpm lint`\n\n## Lint And Format Commands\n\n### Backend\n\n- Lint backend: `cd backend && golangci-lint run`\n- Full backend lint target: `cd backend && make lint`\n- Format one file/package: `cd backend && gofmt -w path/to/file.go && goimports -w path/to/file.go`\n- `cd backend && make lint` is required before commit for any backend code change.\n\nNotes:\n\n- `make lint` also runs generation steps and `go mod tidy`; it is heavier than `golangci-lint run`.\n- `make lint` already covers backend formatting via configured formatters, so agents should treat it as the required backend verification step before commit.\n- `backend/.golangci.toml` enables standard linters and formatters.\n\n### Frontend\n\n- Root formatting: `cd web && pnpm exec prettier --write .`\n- Admin lint one file or folder: `cd web/admin && pnpm exec eslint src/path/to/file.tsx`\n- App format: `cd web/app && pnpm format`\n- App format check: `cd web/app && pnpm format:check`\n- App lint: `cd web/app && pnpm lint`\n\n## Code Style: Go\n\n- Use `gofmt`/`goimports`; do not hand-format imports.\n- Keep imports grouped by standard library, third-party, then local modules.\n- Use tabs and standard Go formatting.\n- Exported names use Go PascalCase; unexported names use camelCase.\n- Receiver names should be short and consistent, usually `u`, `h`, `r`.\n- Keep functions focused; prefer extracting domain logic into `usecase` over large handlers.\n- Return wrapped errors with context using `fmt.Errorf(\"...: %w\", err)`.\n- Use `errors.Is` for sentinel checks.\n- Log internal details, but return user-facing messages from handlers.\n- Follow existing pattern: log with `u.logger.Error(...)` or `h.NewResponseWithError(...)` rather than panicking.\n- Prefer explicit structs over untyped maps unless responding with a tiny ad hoc payload.\n- Respect context propagation. Use `c.Request().Context()` in handlers.\n- For streaming/SSE paths, preserve existing event shapes and flushing behavior.\n\n## Code Style: TypeScript / React\n\n- Follow Prettier formatting and the existing single-quote style.\n- Use path aliases like `@/request/...` and `@/store` in admin code.\n- Prefer explicit types for props and request payloads.\n- Avoid `any`; lint only warns today, but new code should use concrete types where practical.\n- Use `type` for simple object aliases and event payloads; use `interface` for component props when already idiomatic nearby.\n- Components are function components with hooks.\n- Keep state local unless it is shared across routes or features.\n- Clean up subscriptions/AbortControllers/SSE clients in `useEffect` cleanup or modal close handlers.\n- Reuse generated request types from `@/request/types` when available.\n- Do not edit generated swagger client files unless absolutely necessary; prefer wrappers like `nodeStream.ts` for special protocols.\n- Match existing UI libraries: MUI plus `@ctzhian/ui`.\n\n## Naming Conventions\n\n- Backend request structs end with `Req`, response structs with `Resp`.\n- Usecase methods are verbs or verb phrases, e.g. `SummaryNode`, `MoveNode`.\n- Frontend modal and page components use PascalCase filenames and component names.\n- Request helpers in admin use verb-based names from generated swagger files or descriptive wrapper names.\n\n## Error Handling Expectations\n\n- Never swallow backend errors silently.\n- If an error is user-actionable, return a clear message from the handler.\n- If an error is for diagnostics only, log the wrapped error and return a generic message.\n- In frontend code, surface actionable failures with `message.error(...)`.\n- For async UI actions, always stop loading state in both success and error paths.\n- For streaming flows, handle both transport errors and protocol-level `error` events.\n\n## Generated Code And API Clients\n\n- `web/admin/src/request/*` contains generated swagger client code.\n- Generated files use disabled linting and should generally not be hand-edited.\n- If an endpoint needs non-JSON behavior, create a thin wrapper alongside generated code instead of forcing the generated client.\n- Backend swagger generation uses `swag`; if handler docs change significantly, regenerate docs with `cd backend && make generate`.\n- If swagger files change, run `cd web && pnpm api` before committing frontend code so generated request clients stay in sync.\n\n## Practical Guidance For Agents\n\n- Read the nearby code before changing patterns.\n- Prefer the smallest correct change.\n- Preserve existing protocol contracts unless the task explicitly changes them.\n- If the user asks for a review, only produce a review report; do not modify code as part of the review task.\n- If changing an HTTP contract, search for every caller first.\n- When touching backend request flows, verify both handler behavior and frontend request wrappers.\n- When touching frontend request code, check interceptors and special transports like SSE.\n- Do not introduce a new abstraction unless the same logic clearly repeats.\n\n## Verification Checklist\n\n- Backend change: run `go test` on the affected package at minimum.\n- Any backend code change requires `cd backend && make lint` before commit.\n- API contract change: search for all callers and update them together.\n- If swagger files were modified, run `cd web && pnpm api` before committing any related frontend changes.\n- Frontend admin change: run targeted `eslint` and, if feasible, `pnpm build` in `web/admin`.\n- Frontend app change: run `pnpm lint` or `pnpm build` in `web/app` as appropriate.\n- If full builds fail because of pre-existing unrelated issues, say so explicitly.\n"},"files":{"web/packages/icons/package.json":"{\n  \"name\": \"@panda-wiki/icons\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"./src/index.tsx\",\n  \"type\": \"module\",\n  \"scripts\": {\n    \"icon\": \"tsx ./scripts/generate.ts\"\n  },\n  \"exports\": {\n    \".\": \"./src/index.tsx\",\n    \"./*\": \"./src/*.tsx\"\n  },\n  \"keywords\": [],\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"packageManager\": \"pnpm@10.12.1\",\n  \"devDependencies\": {\n    \"tsx\": \"^4.20.5\"\n  }\n}\n","web/packages/icons/tsconfig.json":"{\n  \"extends\": \"../../tsconfig.base.json\",\n  \"compilerOptions\": {\n    /* Icons 图标库特有配置 */\n    \"baseUrl\": \".\",\n    \"paths\": {\n      \"@/*\": [\"src/*\"]\n    },\n    \"tsBuildInfoFile\": \"./node_modules/.tmp/tsconfig.tsbuildinfo\",\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"allowImportingTsExtensions\": true,\n    \"moduleDetection\": \"force\",\n    \"jsx\": \"react-jsx\",\n    \"allowJs\": true,\n    \"esModuleInterop\": true,\n    \"resolveJsonModule\": true\n  },\n  \"include\": [\"src\", \"scripts\"],\n  \"exclude\": [\"node_modules\", \"dist\"]\n}\n","web/packages/ui/package.json":"{\n  \"name\": \"@panda-wiki/ui\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"./src/index.tsx\",\n  \"type\": \"module\",\n  \"types\": \"env.d.ts\",\n  \"scripts\": {\n    \"icon\": \"tsx ./scripts/generate.ts\"\n  },\n  \"exports\": {\n    \".\": \"./src/index.tsx\",\n    \"./*\": \"./src/*/index.tsx\"\n  },\n  \"typesVersions\": {\n    \"*\": {\n      \"*\": [\n        \"src/*/index.tsx\",\n        \"src/*.tsx\"\n      ]\n    }\n  },\n  \"keywords\": [],\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"packageManager\": \"pnpm@10.12.1\",\n  \"dependencies\": {\n    \"gsap\": \"^3.13.0\",\n    \"swiper\": \"^12.0.2\"\n  }\n}\n","web/packages/themes/package.json":"{\n  \"name\": \"@panda-wiki/themes\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"./src/index.ts\",\n  \"type\": \"module\",\n  \"types\": \"./theme.d.ts\",\n  \"exports\": {\n    \".\": \"./src/index.ts\",\n    \"./*\": \"./src/*.ts\",\n    \"./types\": \"./theme.d.ts\"\n  },\n  \"keywords\": [],\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"packageManager\": \"pnpm@10.12.1\"\n}\n","web/packages/themes/tsconfig.json":"{\n  \"extends\": \"../../tsconfig.base.json\",\n  \"compilerOptions\": {\n    /* Themes 主题库特有配置 */\n    \"baseUrl\": \".\",\n    \"paths\": {\n      \"@/*\": [\"src/*\"]\n    },\n    \"tsBuildInfoFile\": \"./node_modules/.tmp/tsconfig.tsbuildinfo\",\n    \"target\": \"ES2020\",\n    \"lib\": [\"ES2020\"],\n    \"allowImportingTsExtensions\": true,\n    \"moduleDetection\": \"force\",\n    \"esModuleInterop\": true,\n    \"resolveJsonModule\": true,\n    \"declaration\": true,\n    \"declarationMap\": true\n  },\n  \"include\": [\"src\", \"theme.d.ts\"],\n  \"exclude\": [\"node_modules\", \"dist\"]\n}\n","web/packages/ui/tsconfig.json":"{\n  \"extends\": \"../../tsconfig.base.json\",\n  \"compilerOptions\": {\n    /* UI 组件库特有配置 */\n    \"baseUrl\": \".\",\n    \"paths\": {\n      \"@/*\": [\"src/*\"]\n    },\n    \"tsBuildInfoFile\": \"./node_modules/.tmp/tsconfig.app.tsbuildinfo\",\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"allowImportingTsExtensions\": true,\n    \"moduleDetection\": \"force\",\n    \"jsx\": \"react-jsx\",\n    \"allowJs\": true,\n    \"esModuleInterop\": true,\n    \"resolveJsonModule\": true,\n\n    /* Linting */\n    \"noUnusedLocals\": false,\n    \"noUnusedParameters\": false,\n    \"noFallthroughCasesInSwitch\": true,\n    \"noUncheckedSideEffectImports\": true\n  },\n  \"include\": [\"src\", \"env.d.ts\"]\n}\n","AGENTS.md":"# AGENTS.md\n\nThis file is for coding agents working in `PandaWiki`.\nPrefer small, targeted changes that match the repository's existing patterns.\nCommunicate with the user in Chinese unless they explicitly ask otherwise.\n\n## Source Of Truth\n\n- There is no existing `AGENTS.md` in this repository.\n- No Cursor rules were found in `.cursor/rules/` or `.cursorrules`.\n- No Copilot instructions were found in `.github/copilot-instructions.md`.\n- Root `CLAUDE.md` exists and should be treated as repository guidance.\n- Key note from `CLAUDE.md`: respect backend layer boundaries and use Chinese for communication.\n\n## Repository Layout\n\n- `backend/`: Go backend services, APIs, workers, migrations, docs.\n- `web/`: pnpm workspace for frontend apps.\n- `web/admin/`: React + Vite admin console.\n- `web/app/`: Next.js user-facing web app.\n- `sdk/`: SDK-related code.\n\n## Architecture Expectations\n\n- Backend follows a layered structure.\n- Put business logic in `backend/usecase/`.\n- Keep HTTP-specific logic in `backend/handler/`.\n- Keep persistence and external data access in `backend/repo/`.\n- Put shared request/response and domain models in `backend/domain/` and `backend/api/`.\n- Do not move business rules into handlers just to finish a feature quickly.\n\n## Tooling Versions And Basics\n\n- Go version: `1.24.3` from `backend/go.mod`.\n- Frontend package manager: `pnpm` only.\n- Admin app build tool: Vite.\n- User app build tool: Next.js.\n- Backend formatting/linting is driven by `gofmt`, `goimports`, and `golangci-lint`.\n- Frontend formatting is primarily Prettier.\n\n## Install Commands\n\nRun these from the repository root unless noted otherwise.\n\n### Backend\n\n- Install Go dependencies: `cd backend && go mod tidy`\n- Build all backend packages: `cd backend && go build ./...`\n\n### Frontend\n\n- Install web dependencies: `cd web && pnpm install`\n- Start both frontend apps: `cd web && pnpm dev`\n\n## Build Commands\n\n### Backend\n\n- Build all packages: `cd backend && go build ./...`\n- Build one package: `cd backend && go build ./usecase`\n- Generate swagger/wire code: `cd backend && make generate`\n- Generate pro swagger/wire code: `cd backend && make generate_pro`\n\n### Frontend\n\n- Build all web apps: `cd web && pnpm build`\n- Build admin only: `cd web/admin && pnpm build`\n- Build app only: `cd web/app && pnpm build`\n- Analyze admin build: `cd web/admin && pnpm build:analyze`\n\n## Test Commands\n\n### Backend\n\n- Run all tests: `cd backend && go test ./...`\n- Run one package: `cd backend && go test ./usecase`\n- Run one test by name in one package: `cd backend && go test ./usecase -run TestName`\n- Run one test with verbose output: `cd backend && go test ./usecase -run TestName -v`\n- Run one package with race detector when needed: `cd backend && go test -race ./usecase`\n\n### Frontend\n\n- `web/admin` currently has no dedicated test script in `package.json`.\n- `web/app` currently has no dedicated test script in `package.json`.\n- For frontend verification, use lint, typecheck, and build as the practical test substitute.\n- Admin typecheck via build pipeline: `cd web/admin && pnpm build`\n- App lint: `cd web/app && pnpm lint`\n\n## Lint And Format Commands\n\n### Backend\n\n- Lint backend: `cd backend && golangci-lint run`\n- Full backend lint target: `cd backend && make lint`\n- Format one file/package: `cd backend && gofmt -w path/to/file.go && goimports -w path/to/file.go`\n- `cd backend && make lint` is required before commit for any backend code change.\n\nNotes:\n\n- `make lint` also runs generation steps and `go mod tidy`; it is heavier than `golangci-lint run`.\n- `make lint` already covers backend formatting via configured formatters, so agents should treat it as the required backend verification step before commit.\n- `backend/.golangci.toml` enables standard linters and formatters.\n\n### Frontend\n\n- Root formatting: `cd web && pnpm exec prettier --write .`\n- Admin lint one file or folder: `cd web/admin && pnpm exec eslint src/path/to/file.tsx`\n- App format: `cd web/app && pnpm format`\n- App format check: `cd web/app && pnpm format:check`\n- App lint: `cd web/app && pnpm lint`\n\n## Code Style: Go\n\n- Use `gofmt`/`goimports`; do not hand-format imports.\n- Keep imports grouped by standard library, third-party, then local modules.\n- Use tabs and standard Go formatting.\n- Exported names use Go PascalCase; unexported names use camelCase.\n- Receiver names should be short and consistent, usually `u`, `h`, `r`.\n- Keep functions focused; prefer extracting domain logic into `usecase` over large handlers.\n- Return wrapped errors with context using `fmt.Errorf(\"...: %w\", err)`.\n- Use `errors.Is` for sentinel checks.\n- Log internal details, but return user-facing messages from handlers.\n- Follow existing pattern: log with `u.logger.Error(...)` or `h.NewResponseWithError(...)` rather than panicking.\n- Prefer explicit structs over untyped maps unless responding with a tiny ad hoc payload.\n- Respect context propagation. Use `c.Request().Context()` in handlers.\n- For streaming/SSE paths, preserve existing event shapes and flushing behavior.\n\n## Code Style: TypeScript / React\n\n- Follow Prettier formatting and the existing single-quote style.\n- Use path aliases like `@/request/...` and `@/store` in admin code.\n- Prefer explicit types for props and request payloads.\n- Avoid `any`; lint only warns today, but new code should use concrete types where practical.\n- Use `type` for simple object aliases and event payloads; use `interface` for component props when already idiomatic nearby.\n- Components are function components with hooks.\n- Keep state local unless it is shared across routes or features.\n- Clean up subscriptions/AbortControllers/SSE clients in `useEffect` cleanup or modal close handlers.\n- Reuse generated request types from `@/request/types` when available.\n- Do not edit generated swagger client files unless absolutely necessary; prefer wrappers like `nodeStream.ts` for special protocols.\n- Match existing UI libraries: MUI plus `@ctzhian/ui`.\n\n## Naming Conventions\n\n- Backend request structs end with `Req`, response structs with `Resp`.\n- Usecase methods are verbs or verb phrases, e.g. `SummaryNode`, `MoveNode`.\n- Frontend modal and page components use PascalCase filenames and component names.\n- Request helpers in admin use verb-based names from generated swagger files or descriptive wrapper names.\n\n## Error Handling Expectations\n\n- Never swallow backend errors silently.\n- If an error is user-actionable, return a clear message from the handler.\n- If an error is for diagnostics only, log the wrapped error and return a generic message.\n- In frontend code, surface actionable failures with `message.error(...)`.\n- For async UI actions, always stop loading state in both success and error paths.\n- For streaming flows, handle both transport errors and protocol-level `error` events.\n\n## Generated Code And API Clients\n\n- `web/admin/src/request/*` contains generated swagger client code.\n- Generated files use disabled linting and should generally not be hand-edited.\n- If an endpoint needs non-JSON behavior, create a thin wrapper alongside generated code instead of forcing the generated client.\n- Backend swagger generation uses `swag`; if handler docs change significantly, regenerate docs with `cd backend && make generate`.\n- If swagger files change, run `cd web && pnpm api` before committing frontend code so generated request clients stay in sync.\n\n## Practical Guidance For Agents\n\n- Read the nearby code before changing patterns.\n- Prefer the smallest correct change.\n- Preserve existing protocol contracts unless the task explicitly changes them.\n- If the user asks for a review, only produce a review report; do not modify code as part of the review task.\n- If changing an HTTP contract, search for every caller first.\n- When touching backend request flows, verify both handler behavior and frontend request wrappers.\n- When touching frontend request code, check interceptors and special transports like SSE.\n- Do not introduce a new abstraction unless the same logic clearly repeats.\n\n## Verification Checklist\n\n- Backend change: run `go test` on the affected package at minimum.\n- Any backend code change requires `cd backend && make lint` before commit.\n- API contract change: search for all callers and update them together.\n- If swagger files were modified, run `cd web && pnpm api` before committing any related frontend changes.\n- Frontend admin change: run targeted `eslint` and, if feasible, `pnpm build` in `web/admin`.\n- Frontend app change: run `pnpm lint` or `pnpm build` in `web/app` as appropriate.\n- If full builds fail because of pre-existing unrelated issues, say so explicitly.\n"},"items":[{"name":"AGENTS.md","path":"AGENTS.md","rawUrl":"https://raw.githubusercontent.com/chaitin/PandaWiki/HEAD/AGENTS.md","title":"AI Agent Protocol & Instructions","category":"root-instruction","format":"markdown","content":"# AGENTS.md\n\nThis file is for coding agents working in `PandaWiki`.\nPrefer small, targeted changes that match the repository's existing patterns.\nCommunicate with the user in Chinese unless they explicitly ask otherwise.\n\n## Source Of Truth\n\n- There is no existing `AGENTS.md` in this repository.\n- No Cursor rules were found in `.cursor/rules/` or `.cursorrules`.\n- No Copilot instructions were found in `.github/copilot-instructions.md`.\n- Root `CLAUDE.md` exists and should be treated as repository guidance.\n- Key note from `CLAUDE.md`: respect backend layer boundaries and use Chinese for communication.\n\n## Repository Layout\n\n- `backend/`: Go backend services, APIs, workers, migrations, docs.\n- `web/`: pnpm workspace for frontend apps.\n- `web/admin/`: React + Vite admin console.\n- `web/app/`: Next.js user-facing web app.\n- `sdk/`: SDK-related code.\n\n## Architecture Expectations\n\n- Backend follows a layered structure.\n- Put business logic in `backend/usecase/`.\n- Keep HTTP-specific logic in `backend/handler/`.\n- Keep persistence and external data access in `backend/repo/`.\n- Put shared request/response and domain models in `backend/domain/` and `backend/api/`.\n- Do not move business rules into handlers just to finish a feature quickly.\n\n## Tooling Versions And Basics\n\n- Go version: `1.24.3` from `backend/go.mod`.\n- Frontend package manager: `pnpm` only.\n- Admin app build tool: Vite.\n- User app build tool: Next.js.\n- Backend formatting/linting is driven by `gofmt`, `goimports`, and `golangci-lint`.\n- Frontend formatting is primarily Prettier.\n\n## Install Commands\n\nRun these from the repository root unless noted otherwise.\n\n### Backend\n\n- Install Go dependencies: `cd backend && go mod tidy`\n- Build all backend packages: `cd backend && go build ./...`\n\n### Frontend\n\n- Install web dependencies: `cd web && pnpm install`\n- Start both frontend apps: `cd web && pnpm dev`\n\n## Build Commands\n\n### Backend\n\n- Build all packages: `cd backend && go build ./...`\n- Build one package: `cd backend && go build ./usecase`\n- Generate swagger/wire code: `cd backend && make generate`\n- Generate pro swagger/wire code: `cd backend && make generate_pro`\n\n### Frontend\n\n- Build all web apps: `cd web && pnpm build`\n- Build admin only: `cd web/admin && pnpm build`\n- Build app only: `cd web/app && pnpm build`\n- Analyze admin build: `cd web/admin && pnpm build:analyze`\n\n## Test Commands\n\n### Backend\n\n- Run all tests: `cd backend && go test ./...`\n- Run one package: `cd backend && go test ./usecase`\n- Run one test by name in one package: `cd backend && go test ./usecase -run TestName`\n- Run one test with verbose output: `cd backend && go test ./usecase -run TestName -v`\n- Run one package with race detector when needed: `cd backend && go test -race ./usecase`\n\n### Frontend\n\n- `web/admin` currently has no dedicated test script in `package.json`.\n- `web/app` currently has no dedicated test script in `package.json`.\n- For frontend verification, use lint, typecheck, and build as the practical test substitute.\n- Admin typecheck via build pipeline: `cd web/admin && pnpm build`\n- App lint: `cd web/app && pnpm lint`\n\n## Lint And Format Commands\n\n### Backend\n\n- Lint backend: `cd backend && golangci-lint run`\n- Full backend lint target: `cd backend && make lint`\n- Format one file/package: `cd backend && gofmt -w path/to/file.go && goimports -w path/to/file.go`\n- `cd backend && make lint` is required before commit for any backend code change.\n\nNotes:\n\n- `make lint` also runs generation steps and `go mod tidy`; it is heavier than `golangci-lint run`.\n- `make lint` already covers backend formatting via configured formatters, so agents should treat it as the required backend verification step before commit.\n- `backend/.golangci.toml` enables standard linters and formatters.\n\n### Frontend\n\n- Root formatting: `cd web && pnpm exec prettier --write .`\n- Admin lint one file or folder: `cd web/admin && pnpm exec eslint src/path/to/file.tsx`\n- App format: `cd web/app && pnpm format`\n- App format check: `cd web/app && pnpm format:check`\n- App lint: `cd web/app && pnpm lint`\n\n## Code Style: Go\n\n- Use `gofmt`/`goimports`; do not hand-format imports.\n- Keep imports grouped by standard library, third-party, then local modules.\n- Use tabs and standard Go formatting.\n- Exported names use Go PascalCase; unexported names use camelCase.\n- Receiver names should be short and consistent, usually `u`, `h`, `r`.\n- Keep functions focused; prefer extracting domain logic into `usecase` over large handlers.\n- Return wrapped errors with context using `fmt.Errorf(\"...: %w\", err)`.\n- Use `errors.Is` for sentinel checks.\n- Log internal details, but return user-facing messages from handlers.\n- Follow existing pattern: log with `u.logger.Error(...)` or `h.NewResponseWithError(...)` rather than panicking.\n- Prefer explicit structs over untyped maps unless responding with a tiny ad hoc payload.\n- Respect context propagation. Use `c.Request().Context()` in handlers.\n- For streaming/SSE paths, preserve existing event shapes and flushing behavior.\n\n## Code Style: TypeScript / React\n\n- Follow Prettier formatting and the existing single-quote style.\n- Use path aliases like `@/request/...` and `@/store` in admin code.\n- Prefer explicit types for props and request payloads.\n- Avoid `any`; lint only warns today, but new code should use concrete types where practical.\n- Use `type` for simple object aliases and event payloads; use `interface` for component props when already idiomatic nearby.\n- Components are function components with hooks.\n- Keep state local unless it is shared across routes or features.\n- Clean up subscriptions/AbortControllers/SSE clients in `useEffect` cleanup or modal close handlers.\n- Reuse generated request types from `@/request/types` when available.\n- Do not edit generated swagger client files unless absolutely necessary; prefer wrappers like `nodeStream.ts` for special protocols.\n- Match existing UI libraries: MUI plus `@ctzhian/ui`.\n\n## Naming Conventions\n\n- Backend request structs end with `Req`, response structs with `Resp`.\n- Usecase methods are verbs or verb phrases, e.g. `SummaryNode`, `MoveNode`.\n- Frontend modal and page components use PascalCase filenames and component names.\n- Request helpers in admin use verb-based names from generated swagger files or descriptive wrapper names.\n\n## Error Handling Expectations\n\n- Never swallow backend errors silently.\n- If an error is user-actionable, return a clear message from the handler.\n- If an error is for diagnostics only, log the wrapped error and return a generic message.\n- In frontend code, surface actionable failures with `message.error(...)`.\n- For async UI actions, always stop loading state in both success and error paths.\n- For streaming flows, handle both transport errors and protocol-level `error` events.\n\n## Generated Code And API Clients\n\n- `web/admin/src/request/*` contains generated swagger client code.\n- Generated files use disabled linting and should generally not be hand-edited.\n- If an endpoint needs non-JSON behavior, create a thin wrapper alongside generated code instead of forcing the generated client.\n- Backend swagger generation uses `swag`; if handler docs change significantly, regenerate docs with `cd backend && make generate`.\n- If swagger files change, run `cd web && pnpm api` before committing frontend code so generated request clients stay in sync.\n\n## Practical Guidance For Agents\n\n- Read the nearby code before changing patterns.\n- Prefer the smallest correct change.\n- Preserve existing protocol contracts unless the task explicitly changes them.\n- If the user asks for a review, only produce a review report; do not modify code as part of the review task.\n- If changing an HTTP contract, search for every caller first.\n- When touching backend request flows, verify both handler behavior and frontend request wrappers.\n- When touching frontend request code, check interceptors and special transports like SSE.\n- Do not introduce a new abstraction unless the same logic clearly repeats.\n\n## Verification Checklist\n\n- Backend change: run `go test` on the affected package at minimum.\n- Any backend code change requires `cd backend && make lint` before commit.\n- API contract change: search for all callers and update them together.\n- If swagger files were modified, run `cd web && pnpm api` before committing any related frontend changes.\n- Frontend admin change: run targeted `eslint` and, if feasible, `pnpm build` in `web/admin`.\n- Frontend app change: run `pnpm lint` or `pnpm build` in `web/app` as appropriate.\n- If full builds fail because of pre-existing unrelated issues, say so explicitly.\n","isInternal":false,"tokens":1977,"sizeBytes":8654},{"name":"package.json","path":"web/packages/icons/package.json","rawUrl":"https://raw.githubusercontent.com/chaitin/PandaWiki/HEAD/web/packages/icons/package.json","title":"@panda-wiki/icons","category":"anthropic-skill","format":"json","content":"{\n  \"name\": \"@panda-wiki/icons\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"./src/index.tsx\",\n  \"type\": \"module\",\n  \"scripts\": {\n    \"icon\": \"tsx ./scripts/generate.ts\"\n  },\n  \"exports\": {\n    \".\": \"./src/index.tsx\",\n    \"./*\": \"./src/*.tsx\"\n  },\n  \"keywords\": [],\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"packageManager\": \"pnpm@10.12.1\",\n  \"devDependencies\": {\n    \"tsx\": \"^4.20.5\"\n  }\n}\n","frontmatter":{"name":"@panda-wiki/icons","version":"1.0.0","description":"","main":"./src/index.tsx","type":"module","scripts":{"icon":"tsx ./scripts/generate.ts"},"exports":{".":"./src/index.tsx","./*":"./src/*.tsx"},"keywords":[],"author":"","license":"ISC","packageManager":"pnpm@10.12.1","devDependencies":{"tsx":"^4.20.5"}},"isInternal":false,"tokens":141,"sizeBytes":398},{"name":"tsconfig.json","path":"web/packages/icons/tsconfig.json","rawUrl":"https://raw.githubusercontent.com/chaitin/PandaWiki/HEAD/web/packages/icons/tsconfig.json","title":"Icons Skill","category":"anthropic-skill","format":"json","content":"{\n  \"extends\": \"../../tsconfig.base.json\",\n  \"compilerOptions\": {\n    /* Icons 图标库特有配置 */\n    \"baseUrl\": \".\",\n    \"paths\": {\n      \"@/*\": [\"src/*\"]\n    },\n    \"tsBuildInfoFile\": \"./node_modules/.tmp/tsconfig.tsbuildinfo\",\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"allowImportingTsExtensions\": true,\n    \"moduleDetection\": \"force\",\n    \"jsx\": \"react-jsx\",\n    \"allowJs\": true,\n    \"esModuleInterop\": true,\n    \"resolveJsonModule\": true\n  },\n  \"include\": [\"src\", \"scripts\"],\n  \"exclude\": [\"node_modules\", \"dist\"]\n}\n","isInternal":false,"tokens":175,"sizeBytes":597},{"name":"package.json","path":"web/packages/themes/package.json","rawUrl":"https://raw.githubusercontent.com/chaitin/PandaWiki/HEAD/web/packages/themes/package.json","title":"@panda-wiki/themes","category":"anthropic-skill","format":"json","content":"{\n  \"name\": \"@panda-wiki/themes\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"./src/index.ts\",\n  \"type\": \"module\",\n  \"types\": \"./theme.d.ts\",\n  \"exports\": {\n    \".\": \"./src/index.ts\",\n    \"./*\": \"./src/*.ts\",\n    \"./types\": \"./theme.d.ts\"\n  },\n  \"keywords\": [],\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"packageManager\": \"pnpm@10.12.1\"\n}\n","frontmatter":{"name":"@panda-wiki/themes","version":"1.0.0","description":"","main":"./src/index.ts","type":"module","types":"./theme.d.ts","exports":{".":"./src/index.ts","./*":"./src/*.ts","./types":"./theme.d.ts"},"keywords":[],"author":"","license":"ISC","packageManager":"pnpm@10.12.1"},"isInternal":false,"tokens":119,"sizeBytes":345},{"name":"tsconfig.json","path":"web/packages/themes/tsconfig.json","rawUrl":"https://raw.githubusercontent.com/chaitin/PandaWiki/HEAD/web/packages/themes/tsconfig.json","title":"Themes Skill","category":"anthropic-skill","format":"json","content":"{\n  \"extends\": \"../../tsconfig.base.json\",\n  \"compilerOptions\": {\n    /* Themes 主题库特有配置 */\n    \"baseUrl\": \".\",\n    \"paths\": {\n      \"@/*\": [\"src/*\"]\n    },\n    \"tsBuildInfoFile\": \"./node_modules/.tmp/tsconfig.tsbuildinfo\",\n    \"target\": \"ES2020\",\n    \"lib\": [\"ES2020\"],\n    \"allowImportingTsExtensions\": true,\n    \"moduleDetection\": \"force\",\n    \"esModuleInterop\": true,\n    \"resolveJsonModule\": true,\n    \"declaration\": true,\n    \"declarationMap\": true\n  },\n  \"include\": [\"src\", \"theme.d.ts\"],\n  \"exclude\": [\"node_modules\", \"dist\"]\n}\n","isInternal":false,"tokens":156,"sizeBytes":549},{"name":"package.json","path":"web/packages/ui/package.json","rawUrl":"https://raw.githubusercontent.com/chaitin/PandaWiki/HEAD/web/packages/ui/package.json","title":"@panda-wiki/ui","category":"anthropic-skill","format":"json","content":"{\n  \"name\": \"@panda-wiki/ui\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"./src/index.tsx\",\n  \"type\": \"module\",\n  \"types\": \"env.d.ts\",\n  \"scripts\": {\n    \"icon\": \"tsx ./scripts/generate.ts\"\n  },\n  \"exports\": {\n    \".\": \"./src/index.tsx\",\n    \"./*\": \"./src/*/index.tsx\"\n  },\n  \"typesVersions\": {\n    \"*\": {\n      \"*\": [\n        \"src/*/index.tsx\",\n        \"src/*.tsx\"\n      ]\n    }\n  },\n  \"keywords\": [],\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"packageManager\": \"pnpm@10.12.1\",\n  \"dependencies\": {\n    \"gsap\": \"^3.13.0\",\n    \"swiper\": \"^12.0.2\"\n  }\n}\n","frontmatter":{"name":"@panda-wiki/ui","version":"1.0.0","description":"","main":"./src/index.tsx","type":"module","types":"env.d.ts","scripts":{"icon":"tsx ./scripts/generate.ts"},"exports":{".":"./src/index.tsx","./*":"./src/*/index.tsx"},"typesVersions":{"*":{"*":["src/*/index.tsx","src/*.tsx"]}},"keywords":[],"author":"","license":"ISC","packageManager":"pnpm@10.12.1","dependencies":{"gsap":"^3.13.0","swiper":"^12.0.2"}},"isInternal":false,"tokens":197,"sizeBytes":558},{"name":"tsconfig.json","path":"web/packages/ui/tsconfig.json","rawUrl":"https://raw.githubusercontent.com/chaitin/PandaWiki/HEAD/web/packages/ui/tsconfig.json","title":"Ui Skill","category":"anthropic-skill","format":"json","content":"{\n  \"extends\": \"../../tsconfig.base.json\",\n  \"compilerOptions\": {\n    /* UI 组件库特有配置 */\n    \"baseUrl\": \".\",\n    \"paths\": {\n      \"@/*\": [\"src/*\"]\n    },\n    \"tsBuildInfoFile\": \"./node_modules/.tmp/tsconfig.app.tsbuildinfo\",\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"allowImportingTsExtensions\": true,\n    \"moduleDetection\": \"force\",\n    \"jsx\": \"react-jsx\",\n    \"allowJs\": true,\n    \"esModuleInterop\": true,\n    \"resolveJsonModule\": true,\n\n    /* Linting */\n    \"noUnusedLocals\": false,\n    \"noUnusedParameters\": false,\n    \"noFallthroughCasesInSwitch\": true,\n    \"noUncheckedSideEffectImports\": true\n  },\n  \"include\": [\"src\", \"env.d.ts\"]\n}\n","isInternal":false,"tokens":211,"sizeBytes":723}],"systemPromptSnippet":"<yakaai_skills repo=\"chaitin/PandaWiki\">\n<!-- File: AGENTS.md (Tokens: ~1977 | Category: root-instruction) -->\n# AGENTS.md\n\nThis file is for coding agents working in `PandaWiki`.\nPrefer small, targeted changes that match the repository's existing patterns.\nCommunicate with the user in Chinese unless they explicitly ask otherwise.\n\n## Source Of Truth\n\n- There is no existing `AGENTS.md` in this repository.\n- No Cursor rules were found in `.cursor/rules/` or `.cursorrules`.\n- No Copilot instructions were found in `.github/copilot-instructions.md`.\n- Root `CLAUDE.md` exists and should be treated as repository guidance.\n- Key note from `CLAUDE.md`: respect backend layer boundaries and use Chinese for communication.\n\n## Repository Layout\n\n- `backend/`: Go backend services, APIs, workers, migrations, docs.\n- `web/`: pnpm workspace for frontend apps.\n- `web/admin/`: React + Vite admin console.\n- `web/app/`: Next.js user-facing web app.\n- `sdk/`: SDK-related code.\n\n## Architecture Expectations\n\n- Backend follows a layered structure.\n- Put business logic in `backend/usecase/`.\n- Keep HTTP-specific logic in `backend/handler/`.\n- Keep persistence and external data access in `backend/repo/`.\n- Put shared request/response and domain models in `backend/domain/` and `backend/api/`.\n- Do not move business rules into handlers just to finish a feature quickly.\n\n## Tooling Versions And Basics\n\n- Go version: `1.24.3` from `backend/go.mod`.\n- Frontend package manager: `pnpm` only.\n- Admin app build tool: Vite.\n- User app build tool: Next.js.\n- Backend formatting/linting is driven by `gofmt`, `goimports`, and `golangci-lint`.\n- Frontend formatting is primarily Prettier.\n\n## Install Commands\n\nRun these from the repository root unless noted otherwise.\n\n### Backend\n\n- Install Go dependencies: `cd backend && go mod tidy`\n- Build all backend packages: `cd backend && go build ./...`\n\n### Frontend\n\n- Install web dependencies: `cd web && pnpm install`\n- Start both frontend apps: `cd web && pnpm dev`\n\n## Build Commands\n\n### Backend\n\n- Build all packages: `cd backend && go build ./...`\n- Build one package: `cd backend && go build ./usecase`\n- Generate swagger/wire code: `cd backend && make generate`\n- Generate pro swagger/wire code: `cd backend && make generate_pro`\n\n### Frontend\n\n- Build all web apps: `cd web && pnpm build`\n- Build admin only: `cd web/admin && pnpm build`\n- Build app only: `cd web/app && pnpm build`\n- Analyze admin build: `cd web/admin && pnpm build:analyze`\n\n## Test Commands\n\n### Backend\n\n- Run all tests: `cd backend && go test ./...`\n- Run one package: `cd backend && go test ./usecase`\n- Run one test by name in one package: `cd backend && go test ./usecase -run TestName`\n- Run one test with verbose output: `cd backend && go test ./usecase -run TestName -v`\n- Run one package with race detector when needed: `cd backend && go test -race ./usecase`\n\n### Frontend\n\n- `web/admin` currently has no dedicated test script in `package.json`.\n- `web/app` currently has no dedicated test script in `package.json`.\n- For frontend verification, use lint, typecheck, and build as the practical test substitute.\n- Admin typecheck via build pipeline: `cd web/admin && pnpm build`\n- App lint: `cd web/app && pnpm lint`\n\n## Lint And Format Commands\n\n### Backend\n\n- Lint backend: `cd backend && golangci-lint run`\n- Full backend lint target: `cd backend && make lint`\n- Format one file/package: `cd backend && gofmt -w path/to/file.go && goimports -w path/to/file.go`\n- `cd backend && make lint` is required before commit for any backend code change.\n\nNotes:\n\n- `make lint` also runs generation steps and `go mod tidy`; it is heavier than `golangci-lint run`.\n- `make lint` already covers backend formatting via configured formatters, so agents should treat it as the required backend verification step before commit.\n- `backend/.golangci.toml` enables standard linters and formatters.\n\n### Frontend\n\n- Root formatting: `cd web && pnpm exec prettier --write .`\n- Admin lint one file or folder: `cd web/admin && pnpm exec eslint src/path/to/file.tsx`\n- App format: `cd web/app && pnpm format`\n- App format check: `cd web/app && pnpm format:check`\n- App lint: `cd web/app && pnpm lint`\n\n## Code Style: Go\n\n- Use `gofmt`/`goimports`; do not hand-format imports.\n- Keep imports grouped by standard library, third-party, then local modules.\n- Use tabs and standard Go formatting.\n- Exported names use Go PascalCase; unexported names use camelCase.\n- Receiver names should be short and consistent, usually `u`, `h`, `r`.\n- Keep functions focused; prefer extracting domain logic into `usecase` over large handlers.\n- Return wrapped errors with context using `fmt.Errorf(\"...: %w\", err)`.\n- Use `errors.Is` for sentinel checks.\n- Log internal details, but return user-facing messages from handlers.\n- Follow existing pattern: log with `u.logger.Error(...)` or `h.NewResponseWithError(...)` rather than panicking.\n- Prefer explicit structs over untyped maps unless responding with a tiny ad hoc payload.\n- Respect context propagation. Use `c.Request().Context()` in handlers.\n- For streaming/SSE paths, preserve existing event shapes and flushing behavior.\n\n## Code Style: TypeScript / React\n\n- Follow Prettier formatting and the existing single-quote style.\n- Use path aliases like `@/request/...` and `@/store` in admin code.\n- Prefer explicit types for props and request payloads.\n- Avoid `any`; lint only warns today, but new code should use concrete types where practical.\n- Use `type` for simple object aliases and event payloads; use `interface` for component props when already idiomatic nearby.\n- Components are function components with hooks.\n- Keep state local unless it is shared across routes or features.\n- Clean up subscriptions/AbortControllers/SSE clients in `useEffect` cleanup or modal close handlers.\n- Reuse generated request types from `@/request/types` when available.\n- Do not edit generated swagger client files unless absolutely necessary; prefer wrappers like `nodeStream.ts` for special protocols.\n- Match existing UI libraries: MUI plus `@ctzhian/ui`.\n\n## Naming Conventions\n\n- Backend request structs end with `Req`, response structs with `Resp`.\n- Usecase methods are verbs or verb phrases, e.g. `SummaryNode`, `MoveNode`.\n- Frontend modal and page components use PascalCase filenames and component names.\n- Request helpers in admin use verb-based names from generated swagger files or descriptive wrapper names.\n\n## Error Handling Expectations\n\n- Never swallow backend errors silently.\n- If an error is user-actionable, return a clear message from the handler.\n- If an error is for diagnostics only, log the wrapped error and return a generic message.\n- In frontend code, surface actionable failures with `message.error(...)`.\n- For async UI actions, always stop loading state in both success and error paths.\n- For streaming flows, handle both transport errors and protocol-level `error` events.\n\n## Generated Code And API Clients\n\n- `web/admin/src/request/*` contains generated swagger client code.\n- Generated files use disabled linting and should generally not be hand-edited.\n- If an endpoint needs non-JSON behavior, create a thin wrapper alongside generated code instead of forcing the generated client.\n- Backend swagger generation uses `swag`; if handler docs change significantly, regenerate docs with `cd backend && make generate`.\n- If swagger files change, run `cd web && pnpm api` before committing frontend code so generated request clients stay in sync.\n\n## Practical Guidance For Agents\n\n- Read the nearby code before changing patterns.\n- Prefer the smallest correct change.\n- Preserve existing protocol contracts unless the task explicitly changes them.\n- If the user asks for a review, only produce a review report; do not modify code as part of the review task.\n- If changing an HTTP contract, search for every caller first.\n- When touching backend request flows, verify both handler behavior and frontend request wrappers.\n- When touching frontend request code, check interceptors and special transports like SSE.\n- Do not introduce a new abstraction unless the same logic clearly repeats.\n\n## Verification Checklist\n\n- Backend change: run `go test` on the affected package at minimum.\n- Any backend code change requires `cd backend && make lint` before commit.\n- API contract change: search for all callers and update them together.\n- If swagger files were modified, run `cd web && pnpm api` before committing any related frontend changes.\n- Frontend admin change: run targeted `eslint` and, if feasible, `pnpm build` in `web/admin`.\n- Frontend app change: run `pnpm lint` or `pnpm build` in `web/app` as appropriate.\n- If full builds fail because of pre-existing unrelated issues, say so explicitly.\n\n<!-- File: web/packages/icons/package.json (Tokens: ~141 | Category: anthropic-skill) -->\n{\n  \"name\": \"@panda-wiki/icons\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"./src/index.tsx\",\n  \"type\": \"module\",\n  \"scripts\": {\n    \"icon\": \"tsx ./scripts/generate.ts\"\n  },\n  \"exports\": {\n    \".\": \"./src/index.tsx\",\n    \"./*\": \"./src/*.tsx\"\n  },\n  \"keywords\": [],\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"packageManager\": \"pnpm@10.12.1\",\n  \"devDependencies\": {\n    \"tsx\": \"^4.20.5\"\n  }\n}\n\n<!-- File: web/packages/icons/tsconfig.json (Tokens: ~175 | Category: anthropic-skill) -->\n{\n  \"extends\": \"../../tsconfig.base.json\",\n  \"compilerOptions\": {\n    /* Icons 图标库特有配置 */\n    \"baseUrl\": \".\",\n    \"paths\": {\n      \"@/*\": [\"src/*\"]\n    },\n    \"tsBuildInfoFile\": \"./node_modules/.tmp/tsconfig.tsbuildinfo\",\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"allowImportingTsExtensions\": true,\n    \"moduleDetection\": \"force\",\n    \"jsx\": \"react-jsx\",\n    \"allowJs\": true,\n    \"esModuleInterop\": true,\n    \"resolveJsonModule\": true\n  },\n  \"include\": [\"src\", \"scripts\"],\n  \"exclude\": [\"node_modules\", \"dist\"]\n}\n\n<!-- File: web/packages/themes/package.json (Tokens: ~119 | Category: anthropic-skill) -->\n{\n  \"name\": \"@panda-wiki/themes\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"./src/index.ts\",\n  \"type\": \"module\",\n  \"types\": \"./theme.d.ts\",\n  \"exports\": {\n    \".\": \"./src/index.ts\",\n    \"./*\": \"./src/*.ts\",\n    \"./types\": \"./theme.d.ts\"\n  },\n  \"keywords\": [],\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"packageManager\": \"pnpm@10.12.1\"\n}\n\n<!-- File: web/packages/themes/tsconfig.json (Tokens: ~156 | Category: anthropic-skill) -->\n{\n  \"extends\": \"../../tsconfig.base.json\",\n  \"compilerOptions\": {\n    /* Themes 主题库特有配置 */\n    \"baseUrl\": \".\",\n    \"paths\": {\n      \"@/*\": [\"src/*\"]\n    },\n    \"tsBuildInfoFile\": \"./node_modules/.tmp/tsconfig.tsbuildinfo\",\n    \"target\": \"ES2020\",\n    \"lib\": [\"ES2020\"],\n    \"allowImportingTsExtensions\": true,\n    \"moduleDetection\": \"force\",\n    \"esModuleInterop\": true,\n    \"resolveJsonModule\": true,\n    \"declaration\": true,\n    \"declarationMap\": true\n  },\n  \"include\": [\"src\", \"theme.d.ts\"],\n  \"exclude\": [\"node_modules\", \"dist\"]\n}\n\n<!-- File: web/packages/ui/package.json (Tokens: ~197 | Category: anthropic-skill) -->\n{\n  \"name\": \"@panda-wiki/ui\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"./src/index.tsx\",\n  \"type\": \"module\",\n  \"types\": \"env.d.ts\",\n  \"scripts\": {\n    \"icon\": \"tsx ./scripts/generate.ts\"\n  },\n  \"exports\": {\n    \".\": \"./src/index.tsx\",\n    \"./*\": \"./src/*/index.tsx\"\n  },\n  \"typesVersions\": {\n    \"*\": {\n      \"*\": [\n        \"src/*/index.tsx\",\n        \"src/*.tsx\"\n      ]\n    }\n  },\n  \"keywords\": [],\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"packageManager\": \"pnpm@10.12.1\",\n  \"dependencies\": {\n    \"gsap\": \"^3.13.0\",\n    \"swiper\": \"^12.0.2\"\n  }\n}\n\n<!-- File: web/packages/ui/tsconfig.json (Tokens: ~211 | Category: anthropic-skill) -->\n{\n  \"extends\": \"../../tsconfig.base.json\",\n  \"compilerOptions\": {\n    /* UI 组件库特有配置 */\n    \"baseUrl\": \".\",\n    \"paths\": {\n      \"@/*\": [\"src/*\"]\n    },\n    \"tsBuildInfoFile\": \"./node_modules/.tmp/tsconfig.app.tsbuildinfo\",\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"allowImportingTsExtensions\": true,\n    \"moduleDetection\": \"force\",\n    \"jsx\": \"react-jsx\",\n    \"allowJs\": true,\n    \"esModuleInterop\": true,\n    \"resolveJsonModule\": true,\n\n    /* Linting */\n    \"noUnusedLocals\": false,\n    \"noUnusedParameters\": false,\n    \"noFallthroughCasesInSwitch\": true,\n    \"noUncheckedSideEffectImports\": true\n  },\n  \"include\": [\"src\", \"env.d.ts\"]\n}\n</yakaai_skills>"}