Agent skill
import-mapping-feedback-loop
How to add explicit import-time column/material mapping without weakening deterministic defaults
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/import-mapping-feedback-loop
SKILL.md
Context
Use this when a file import flow must keep its exact-match happy path, but still let users recover from mismatched headers or unknown material names inside the app.
Pattern
- Keep the default strict. Exact header/material matches should continue to work with zero extra input.
- Return mapping metadata on every import response. Include detected source columns, required field mapping status, and unique imported material resolutions so the UI can react without inventing its own parser.
- Suggest, don’t auto-apply. Deterministic header aliases (
Part Id→Id,Qty→Quantity) are useful as suggestions, but require an explicit user mapping before import succeeds. - Separate pure import from side effects. Let the service layer consume explicit mappings; let the bridge/app layer create missing library entities first, then rerun import with the created ids.
- Rewrite imported material values to the resolved library name before validation. That keeps downstream project/nesting flows working with canonical material names.
- Keep the UI two-speed. Let exact header/material files stay on the fast import path, but hold mismatched files in a review session that tracks pending mapping edits, requires an explicit preview refresh after operator changes, and only creates new materials on final commit.
Good signs
- The same
import-fileroute can support first-pass analysis and final import. - Unknown materials are listed once per source value with a stable status (
resolved,unresolved,created). - Row validation codes stay actionable instead of disappearing behind bridge-only errors.
Anti-patterns
- Auto-mapping fuzzy headers without telling the user.
- Creating materials inside the pure parser/validator service.
- Returning only row errors and forcing the UI to re-open the file itself to learn what headers existed.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?