用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/hiroppy/mf-dashboard --skill crawler-scraper命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Use when adding/modifying database tables or columns in Drizzle ORM schema
Use when needing to visualize database schema, generate ERD diagrams from Drizzle ORM schemas, or understand table relationships
Use when creating new UI components under apps/web/src/components/
基于 SOC 职业分类
正在显示 SKILL.md
| name | crawler-scraper |
| description | Use when adding new scraping targets to the crawler |
packages/meta/src/urls.tsapps/crawler/src/scrapers/packages/db/src/types.tsapps/crawler/src/index.ts| Purpose | Location |
|---|---|
| URLs | packages/meta/src/urls.ts |
| Scrapers | apps/crawler/src/scrapers/*.ts |
| Types | packages/db/src/types.ts |
| Repositories | packages/db/src/repositories/ |
| Parsers | apps/crawler/src/parsers.ts |
| Entry point | apps/crawler/src/index.ts |
// apps/crawler/src/scrapers/my-feature.ts
import type { MyData } from "@mf-dashboard/db/types";
import type { Page } from "playwright";
import { mfUrls } from "@mf-dashboard/meta";
import { debug } from "../logger.js";
import { parseJapaneseNumber } from "../parsers.js";
export async function getMyData(page: Page): Promise<MyData> {
debug("Getting my data from /path...");
await page.goto(mfUrls.myFeature, {
waitUntil: "domcontentloaded",
});
await page.waitForTimeout(2000);
// Scraping logic here...
const rows = page.locator("table tbody tr");
const count = await rows.count();
const results: MyItem[] = [];
for (let i = 0; i < count; i++) {
const row = rows.nth(i);
const text = await row
.locator("td")
.first()
.textContent({ timeout: 1000 })
.catch(() => "");
results.push({
// parsed data
});
}
return { items: results };
}
// packages/meta/src/urls.ts
export const mfUrls = {
// existing urls...
myFeature: "https://moneyforward.com/path/to/feature",
};
| Priority | Type | When to Use | Location |
|---|---|---|---|
| 1 | Unit | Post-extraction parsing, normalization, comparison, mapping, and fail-closed decisions using anonymous strings or objects | *.test.ts next to source |
| 2 | E2E | Selectors, navigation, and required HTML/DOM structure on the authenticated real service | tests/e2e/*.test.ts in the e2e Vitest project |
| 3 | HTML fixture exception | A failure branch that cannot be produced safely and deterministically against the real service | The narrowest applicable unit test |
pnpm --filter @mf-dashboard/crawler testpnpm --filter @mf-dashboard/crawler test:e2eSKIP_REFRESH=true pnpm --filter @mf-dashboard/crawler startdebug/ directorydebug/ directoryparseJapaneseNumber() for Japanese currency format (e.g., "1,234円" → 1234)debug() from logger for debug output.catch(() => defaultValue){ timeout: 1000 } for individual element queries to avoid hanging