skills/longmo/SKILL.md
Longmo's opinionated tooling and conventions for JavaScript/TypeScript projects. Use when setting up new projects, configuring ESLint/Prettier alternatives, monorepos, library publishing, or when the user mentions Longmo's preferences.
npx skillsauth add long36708/longmo-skills longmoInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
| Category | Preference |
|----------------------|-------------------------------------------------------------------------------|
| Package Manager | pnpm (with @antfu/ni for unified commands) |
| Language | TypeScript (strict mode, ESM only) |
| Linting & Formatting | @antfu/eslint-config (no Prettier) + eslint-plugin-oxlint + commitlint |
| Testing | Vitest |
| Git Hooks | lefthook |
| Bundler (Libraries) | tsdown |
| Documentation | VitePress |
| Command | Description |
|----------------------------|--------------------------------------------|
| ni | Install dependencies |
| ni <pkg> / ni -D <pkg> | Add dependency / dev dependency |
| nr <script> | Run script |
| nu | Upgrade dependencies |
| nun <pkg> | Uninstall dependency |
| nci | Clean install (pnpm i --frozen-lockfile) |
| nlx <pkg> | Execute package (npx) |
{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "bundler",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true
}
}
// eslint.config.mjs
import antfu from '@antfu/eslint-config'
import oxlint from 'eslint-plugin-oxlint'
export default [
...(await antfu({
vue: {
overrides: {
'vue/html-self-closing': 'off',
},
},
})),
...oxlint.configs['flat/all'],
]
Fix linting errors with nr lint --fix. Do NOT add a separate lint:fix script.
For detailed configuration options: antfu-eslint-config
// commitlint.config.mjs
export default {
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [
2,
'always',
[
'feat', // 新功能
'fix', // 修复
'docs', // 文档
'style', // 代码格式(不影响代码运行的变动)
'refactor', // 重构
'perf', // 性能优化
'test', // 测试
'chore', // 构建过程或辅助工具的变动
'ci', // CI配置
'revert', // 回滚
'build', // 构建系统
],
],
'subject-case': [0], // 不限制 subject 大小写
},
}
# Lefthook 配置文件
# 参考:https://github.com/evilmartians/lefthook
pre-commit:
parallel: true
commands:
# 格式化和检查 Vue 文件
lint-vue:
glob: '*.vue'
run: pnpm exec eslint --cache --fix {staged_files}
fail_text: "ESLint 检查失败,请修复错误后再提交"
# 格式化和检查 TypeScript/JavaScript 文件
lint-ts:
glob: '*.{ts,tsx,js,jsx}'
run: pnpm exec eslint --cache --fix {staged_files}
fail_text: "ESLint 检查失败,请修复错误后再提交"
commit-msg:
commands:
commitlint:
run: pnpm exec commitlint --edit {1}
fail_text: "提交信息不符合规范,请参考 Conventional Commits 规范"
skip: 'git log -1 --pretty=%s | grep -q "\[skip ci\]"'
{
"scripts": {
"prepare": "lefthook install"
}
}
务必用 lefthook 更新 pnpm-workspace.yaml onlyBuiltDependencies, 并在根 package.json 中添加 lefthook pnpm.onlyBuiltDependencies, 否则lefthook包的安装后脚本不会被执行,钩子也不会被安装。
foo.ts → foo.test.ts (same directory)describe/it API (not test)toMatchSnapshot for complex outputstoMatchFileSnapshot with explicit path for language-specific snapshotsUse named catalogs in pnpm-workspace.yaml for version management:
| Catalog | Purpose |
|------------|--------------------------------------|
| prod | Production dependencies |
| inlined | Bundler-inlined dependencies |
| dev | Dev tools (linter, bundler, testing) |
| frontend | Frontend libraries |
Avoid the default catalog. Catalog names can be adjusted per project needs.
| Topic | Description | Reference | |---------------------|-----------------------------------------------------------------|----------------------------------------------------------| | ESLint Config | Framework support, formatters, rule overrides, VS Code settings | antfu-eslint-config | | Project Setup | .gitignore, GitHub Actions, VS Code extensions | setting-up | | App Development | Vue/Nuxt/UnoCSS conventions and patterns | app-development | | Library Development | tsdown bundling, pure ESM publishing | library-development | | Monorepo | pnpm workspaces, centralized alias, Turborepo | monorepo |
documentation
Use this skill any time a .pptx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates, layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx filename, regardless of what they plan to do with the content afterward. If a .pptx file needs to be opened, created, or touched, use this skill.
development
Portless development server proxy that eliminates port conflicts by routing through localhost subdomains. Use when setting up development servers, managing multiple apps, avoiding port conflicts, or working with monorepos and turborepo projects.
content-media
Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.
development
MSW (Mock Service Worker) v2 最佳实践、模式和API指南,用于 JavaScript/TypeScript测试和开发中的API模拟。涵盖处理器 设计、服务器设置、响应构造、测试模式、GraphQL和 v1到v2迁移。基准版本:msw ^2.0.0。 触发条件:msw导入,http.get,http.post,HttpResponse,setupServer, setupWorker,graphql.query,提及"msw"、"mock service worker"、 "api mocking"或"msw v2"。