with one click
with one click
| name | lint |
| description | Check code against Tinker plugin coding standards |
| argument-hint | <plugin-name-or-file-path> |
Review a Tinker plugin's source code and report any violations of the project's coding standards defined in AGENTS.md.
plugin-name-or-file-path: plugin folder name (e.g. tinker-hash) or a specific file path to checkGo through each category below and report violations with file path and line number.
tinker- prefixToolbar.tsx)store.ts (lowercase)index.scssconst Toolbar = observer(...))Toolbar component that also imports Toolbar from share/components/Toolbar), suffix the local component with Component (e.g. ToolbarComponent). This is intentional and should NOT be reported as a violation.BaseStore from share/BaseStoresuper() before makeAutoObservable(this)export default new Store()#0fc25e, #e0e0e0, rgb(...))bg-green-500, text-gray-800) are allowedtw.* utilities from share/theme for theme-aware colors (primary, border, background, etc.)import { tw, THEME_COLORS } from 'share/theme'observer()lib/ directory)src/lib/src/utils/, src/helpers/store.ts that has no dependency on store state or MobX should be extracted to src/lib/. Candidates: pure functions, data transformation, algorithm helpers, API wrapperssrc/lib/index.ts as a catch-all. Name files by their purpose (e.g. util.ts, math.ts). When unsure of the name, use lib/util.tsany types — use proper types or union typessrc/renderer/ directory: extract to src/renderer/types.tssrc/renderer/ directory: extract to src/types.tspreload and renderer must be extracted to src/common/types.tsimport type { Foo } from './types'; export type { Foo } in an unrelated file is forbidden)t() from react-i18next, not hardcoded stringssrc/i18n/index.ts, src/i18n/locales/en-US.json, src/i18n/locales/zh-CN.json.) or other symbols (e.g. use categoryAll not category.all, ruleSysTmp not rule.sysTmp)// Set loading state before this.isLoading = true)index.scss) should only be used for third-party library style overrideslucide-react for icons: import { Copy } from 'lucide-react'import Icon from '../assets/icon.svg?react'TOOLBAR_ICON_SIZE constantFor each violation found, output:
[Category] file/path:line — description of violation
Example:
[Theme] src/components/Toolbar.tsx:12 — hardcoded color `#0fc25e`, use tw.primary.bg instead
[Naming] src/components/toolbar.tsx — component file should be PascalCase: Toolbar.tsx
[Store] src/store.ts:5 — Store must extend BaseStore from share/BaseStore
[Comments] src/App.tsx:34 — comment in Chinese, must use English
If no violations are found, report: No violations found.
.ts, .tsx, .scss files under <plugin-name>/src/. If a file path is given, check that file only.<plugin-name> with the actual folder name):IMPORTANT:
lsla is a global command — use it directly, do NOT use npx prettiereslint lives at the Tinker monorepo root (../node_modules/.bin/eslint relative to the current workspace) — do NOT look elsewhere, do NOT use npx eslint../ relative to the current workspace). Plugins live under plugins/ at that root.cd .. && lsla prettier "plugins/<plugin-name>/src/**/*.{ts,tsx,json,scss}" --write
cd .. && node_modules/.bin/eslint "plugins/<plugin-name>/src/**/*.{ts,tsx}"
If eslint reports errors, fix them by editing the relevant files, then re-run eslint to confirm all errors are resolved.
cd <plugin-name> && npm run build
If the build fails, fix the errors, then re-run the build to confirm it succeeds.
cd <plugin-name> && npx tsc --noEmit
IMPORTANT: Only fix errors in files that are tracked by git. Never touch files under references/ directories or any file listed in .gitignore — these are reference materials only.
If there are TypeScript errors, fix them, then re-run to confirm all errors are resolved.
[HINT] Download the complete skill directory including SKILL.md and all related files