技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
brightdata-local-dev-loop【数据与研究】Build a local Bright Data development loop that defaults to synthetic fixtures and makes live traffic explicit. Use when implementing parsers, retry classification, or snapshot handling without spending credits or collecting data. Trigger with: "mock Bright Data locally", "test a Bright Data adapter offline", "add a safe live-test switch".
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
name: brightdata-local-dev-loop description: 'Build a local Bright Data development loop that defaults to synthetic fixtures and makes live traffic explicit. Use when implementing parsers, retry classification, or snapshot handling without spending credits or collecting data. Trigger with: "mock Bright Data locally", "test a Bright Data adapter offline", "add a safe live-test switch".' allowed-tools: Read, Grep, Write, Edit, Bash(npm:*) version: 2.0.0 argument-hint: "[adapter-path]" model: inherit effort: high license: MIT author: Jeremy Longshore jeremy@intentsolutions.io tags:
Separate transport from parsing so ordinary development is deterministic and credential-free. The live lane is opt-in, target-allowlisted, budgeted, and incapable of silently replacing fixtures.
Read the adapter and Grep for direct proxy/API calls in business logic. Move transport behind a narrow interface before recording fixtures.
Write configuration with fixture as the default and live requiring three independent gates.
brightdata:
mode: fixture
live_requires:
- BRIGHTDATA_LIVE_TEST=1
- approved_target_manifest
- bounded_cost_budget
Add fixtures for success, 407, policy 403, 429, building, ready, failed, empty, and expired states. Test parsers against provider fields rather than copied HTML.
Use Bash(npm:*) for unit and contract tests. Permit the live suite only in a protected environment, against an approved target, with a one-job ceiling and redacted receipt.
Use Read and Grep for discovery. Use Write and Edit only for the adapter, fixtures, tests, and documented configuration. Use Bash(npm:*) for the named local suites; never let a default test command send live Bright Data traffic.
A parser change should pass against a synthetic snapshot and recorded provider-error metadata with no credentials present. A maintainer may later enable one protected live job; its output updates no fixture automatically and is reviewed before adoption.
| Failure | Meaning | Response |
|---|---|---|
| Unit tests attempt network access | Transport leaked into parsing code | Block network and refactor through the adapter |
| Fixture contains target data | Captured live content was committed | Remove it and replace it with synthetic minimal data |
| Live gate has only one switch | Accidental execution remains possible | Require environment, target manifest, and budget gates |