Community图像github.com

extract-transfer-prompt

从原图及用户指定范围提取固定、独立的视觉特征描述,通过关键点确认、首轮校准和跨图验证,交付修改、替换、新增三类应用 prompt。适用于字体质感、光影、姿势、样式或具体元素的提示词逆向与迁移实测,不用于仅描述图片或普通修图。

extract-transfer-prompt 是什么?

extract-transfer-prompt is a Claude Code agent skill that 从原图及用户指定范围提取固定、独立的视觉特征描述,通过关键点确认、首轮校准和跨图验证,交付修改、替换、新增三类应用 prompt。适用于字体质感、光影、姿势、样式或具体元素的提示词逆向与迁移实测,不用于仅描述图片或普通修图。.

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/AAAtuanzi/image-everything-transfer/tree/HEAD

Installed? Explore more 图像 skills: steipete/songsee, affaan-m/frontend-design, mattpocock/improve-codebase-architecture · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Image Feature Extraction & Transfer Validation

Objective & Collaboration Principles

Extract the intrinsic visual features of a user-specified object from the source image, forming a fixed, independent pure description that can be accurately rendered on other images under their existing viewpoint, composition, and scene conditions. The primary acceptance criterion is the accuracy and stability of cross-image transfer; the original image is used for diagnostic purposes, and minor detail differences that do not affect core features are acceptable.

The AI is responsible for decomposition, proposing adaptation plans, and defining scope of applicability. The user confirms the plan before generation, then calibrates after the first transfer. Thereafter, the AI validates autonomously against the calibration standard. Only when a change to confirmed intent, keypoints, or boundaries is necessary should the user be re-engaged for confirmation; do not repeatedly ask about trivial wording revisions.

Follow a feedback loop of "understand → hypothesize → generate → observe → reflect." Accurate description and accurate execution by the model are two different things. Do not guarantee that any model will achieve arbitrary precision, do not package visual judgment as exact percentages, and do not claim to have trained the model or performed reinforcement learning.

1. Input, Decomposition & Pre-Generation Confirmation

Required inputs are the source image (S) and the extraction region. If the image is missing, ask the user to upload it. If the region is ambiguous for the task, clarify; do not arbitrarily expand the region to capture the full-image style. If the user has a target image (T), examine it together; if not, you can extract first and generate a test base image.

Decompose task-relevant dimensions from visible evidence: content, contour proportions, spatial and joint relationships, color, lighting, reflection, texture, brushstroke, grain, text layout, etc. Prioritize describing relative relationships and observable features. Do not fabricate details, color values, dimensions, lenses, or hidden structures just to fill dimensions. Mark unknown depth and occlusion relationships as inferred.

Present the user with a concise and specific keypoint confirmation checklist:

  • Object & Boundary: Which objects, regions, or global attributes to extract, including any associated features.
  • Core Features & Priorities: Numbered list identifying which features, if lost, would make the transfer fail, and which are acceptable variations. Distinguish between user requirements, AI suggestions, and uncertain items.
  • Extraction Layers & Locked Layers: For content, shape, material, lighting, etc., specify what to extract and what to retain. For example, extracting only font texture must not change the text, glyphs, or layout.
  • Adaptation Rules: Which intrinsic rules remain invariant, and which visual properties should adapt to the target image's viewpoint, lighting, scale, and occlusion. When extracting material, highlights may change with the target light source; when extracting lighting itself, confirmed lighting features must not be adapted away.
  • Scope of Applicability & Transfer Span: Propose specific applicable scenarios and meaningful test variations. Do not assume the feature can transfer across all subjects and media by default.
  • Allowed Impacts & Protected Range: Specify necessary object changes, required completions, reasonable physical interactions, and non-target content that must remain unchanged.

Explicitly ask the user to confirm or correct each numbered item. You may analyze before confirmation, but do not create base templates or generate verification images. Silence, timeout, or partial responses do not substitute for full confirmation of the checklist. Only follow up on remaining unresolved key items. Reuse existing clear confirmations; do not ask for them again.

After confirmation, establish an observation record: keypoint number, source image evidence, priority, invariant rule, adaptation condition, corresponding text in the description, generation result, and deviation. Every subsequent revision and final delivery must be checked against this record. Do not silently drop keypoints in exchange for overall similarity.

2. Target Image Suitability & Protection Principles

Before generating on any target image, check whether it can bear the extracted features within the confirmed scope.

  • Preserve the target image's shooting perspective, composition, aspect ratio, crop, and non-target content visually intact. Do not require pixel-perfect identity. Do not rotate the lens, shift the main subject's overall position, zoom the frame, expand the canvas, or recompose the scene to accommodate the effect.
  • Specified attributes of the extracted object may change; all other attributes are protected per the confirmation checklist. For example, a pose transfer may change joints and contours, but should not alter the person's identity or the target image's existing orientation. Joint actions must be distinguished from camera perspective.
  • Understand the feature's structure before projecting onto the target viewpoint: when transferring a frontal pose to a side-view person, preserve the target person's side orientation; express the pose through torso, joints, center of gravity, and limb relationships. Do not copy the source image's 2D contour or turn the person to face forward.
  • Allow in-frame occlusion completion caused by action, deletion, or replacement. Necessary completion is not canvas expansion or a reason to redraw unrelated areas.
  • Shadows, reflections, halos, contact, and occlusion must follow the target scene's physical relationships, changing only within the minimum reasonable range required to achieve the goal. Do not arbitrarily change overall color tone, global lighting, or background design to "blend." If impact exceeds confirmed boundaries, reconfirm first.
  • Features outside the original canvas or occluded should not be forcibly shown; mark them as "invisible, cannot verify." Parts that are visible may be verified, but you cannot claim all features are verified based on them. Core features requiring verification should be visible on other suitable samples.
  • Obvious hard conflicts can be pointed out before generation, citing evidence and feasible options. Do not force trial-and-error. When uncertain, use small-scale diagnostic experiments to test, without treating inferences as facts. If resolving the conflict requires relaxing confirmed conditions, explain to the user and wait for a decision; do not change conditions yourself.

If the user extracts composition but the application also requires locking the target image's composition, explain the specific conflict and confirm the scope. Do not automatically override the protection by claiming composition extraction.

3. Two-Layer Prompt & Experimental Isolation

Feature Description D is a fixed piece of text that purely describes the extracted object. It describes intrinsic structure, material, lighting rules, etc. It must not contain operational instructions (e.g., modification position, background protection), nor reference "source image", "above image", "previous round", or external files. When extracting only a style, it must not carry unrelated characters, scenes, brands, or compositions from the source image. D may evolve into new versions during optimization; once finalized, it is frozen.

Application Instruction A handles the target object, position, operation type, scene adaptation, and protection constraints. It falls into three categories: modify existing attributes, replace an object, or add a new object. The complete executable prompt is A appended with the full D. Each final application prompt must embed the same D inline; the user must not be asked to concatenate or reference another text block.

Different test images may change the object, position, and operation information explicitly in A, but must not use A to sneak in feature descriptions that only apply to that particular image. Adaptation rules must remain consistent. If a general visual feature needs correction, revise D and revalidate. Record D version, A version, and the actual full request sent. Distinguish description problems from execution problems.

Use currently available image generation tools; in this environment, prefer the built-in image_gen and follow its actual interface. Isolate the following assets: source image S, fixed base template B, fixed transfer base image T, and generation result R.

  • S is used only for observation, base template creation, and result comparison. Reconstruction is B + A + D, transfer is T + A + same-version D. These calls must not include S, target crops, or other style references.
  • Each round regenerates from the fixed B or fixed T. Do not feed the previous round's R as the next round's input. Do not substitute manual retouching, programmatic filters, collages, or overpainting for prompt validation. If the tool calls it "image editing," that does not violate the rule—the key is that the base input is fixed.
  • Always view local images first, then explicitly pass the required base image path. If only a "recent image" reference mechanism is available, check that the referenced set does not include S or historical results. If isolation is impossible, resolve the input method or report validation limitation.
  • Control available model and generation settings. Do not fabricate unsupported parameters (e.g., seed). Success with a fixed seed cannot substitute for independent re-testing. Do not add hidden prompt text beyond the delivered text to improve results.

4. Fixed Base Template & Reconstruction Diagnosis

Create B by removing the extracted feature from S while preserving the rest of the structure: for local elements, remove the object itself and any relevant residual traces within the scope; for materials, brushstrokes, lighting, or global styles, use a clearly neutral baseline without deleting the carrier body. For pose extraction, under conditions where identity, viewpoint, and scene are kept as similar as possible, switch to a neutral pose; check whether it still leaks the target pose.

Verify that B has truly removed the feature and that non-target content is usable for comparison. If the base template is defective, revise the removal instruction and recreate from S; do not patch a failed base template. Once qualified, freeze B. If the base template is later changed, mark old reconstruction results as no longer comparable.

Construct D based on the confirmation checklist, then generate a reconstruction image using B and the corresponding A. Inspect key regions and details for feature accuracy and non-target drift. Reconstruction is used to discover omissions, ambiguities, and over-binding. Do not sacrifice transfer ability for pixel-level consistency with S or for non-critical details. Do not iterate infinitely on irrelevant details.

5. Transfer Samples & First-Round User Calibration

Within the confirmed scope of applicability, independently and randomly generate 2–4 transfer base images (default 3). The differences in subject, viewpoint, scale, background, or lighting must be diagnostically meaningful for this extraction. Do not pass S, B, R, or the target feature description when generating these base images. Do not select images that already have the target effect as "success cases." If the user has provided a target image, prioritize it for real application; it can serve as an additional sample.

Decide the scene first, then observe results. Do not cherry-pick only successful cases. Ensure key features have visible verification opportunities across the test set. Cover the three operation types (modify, replace, add) as applicable. Record which modes are tested on which samples. 2–4 refers to the number of base images, not the number of total generations. If an operation is not applicable, explain why; do not force a test or claim the mode has been verified.

The first round typically applies the same D to different scenes. If two equally plausible interpretations remain that affect the result, compare them on the same T first to clarify differences; this does not replace subsequent cross-image tests. Keep at least one base image unused until candidate finalization to reduce optimization against seen samples.

Present the user with before-and-after comparisons of the first round and a brief judgment. Ask the user to calibrate: which features are correct, which deviate most from the intent, and whether the blending and emphasis are appropriate. Wait for substantial feedback. Do not assume user satisfaction. You may continue organizing evidence, but do not treat unconfirmed aesthetic preferences as optimization criteria.

Convert feedback into specific, observable criteria. Repeat them briefly, then continue. Only follow up if feedback contains critical ambiguity. Thereafter, validate autonomously without asking the user for scores each round. Only re-confirm relevant parts when new conclusions require changing established boundaries.

6. Reflection, Controlled Experiments & Reconstruction

Each round, actually inspect results. First locate the problem layer, then decide which layer to change:

ProblemNext Step
Extracted object or internal relationship misunderstandingReturn to S, checklist, and user calibration; re-decompose and build D from scratch
D is ambiguous, contradictory, redundant, or bound to source imageRewrite, simplify, delete text experimentally confirmed as invalid or conflicting
Target viewpoint, lighting, or occlusion adaptation errorCorrect A's adaptation rules without changing confirmed core features
Uncontrolled application area or non-target driftCorrect A's positioning and protection constraints; check base image suitability
Unknown causeUse controlled experiments to distinguish candidate causes; avoid changing all variables at once
Clear requirement not stably executedRe-test independently and record fluctuation; check model execution limits; do not automatically assume need for more words

Each round, record: observed deviation, hypothesis to test, specific modification, expected change, actual change, and whether to retain the change. Routine revisions target the top 1–3 deviations. If a foundational assumption is wrong, allow a full rewrite without being constrained to "small changes."

Controlled experiments can compare material vs. lighting contributions, the effect of removing a passage, or building a concise description vs. an old complex one. Experiments need not produce a polished product, but must answer a clear question, generate from a fixed base image, and (when conditions allow) keep all other factors constant. Account for generation fluctuation: a single difference is not causal proof; significant conclusions require replication.

If two consecutive rounds show no observable improvement or rule out no hypotheses, force a strategy review. Do not declare failure or continue adding adjectives. Check source image evidence, boundaries, base template information leakage, description conflicts, and tool capabilities. Choose a new diagnostic experiment or rebuild a candidate. The new round must have different, testable basis; do not mechanically retry the same failing request.

Keep the best candidate, failure records, and valid conclusions. After D is updated, re-check reconstruction and all transfer samples. After A is updated, recheck affected modes. Do not use old-version results to validate new versions. After using a held-out image's result to revise the description, that image is no longer an unseen test. You may add a new base image within the limit of 4; if unable to add more, state that honestly without pretending to perform independent tests.

7. Validation, Continuation & Resource Boundaries

Separately validate two criteria. Failure on either means overall failure:

  1. Feature Accuracy: Confirmed key features hold in applicable and visible regions, and are stable across images. Mark invisible items separately. Do not offset a critical failure with other features.
  2. Compliance with Application Constraints: Viewpoint, composition, aspect ratio, and non-target content are visually stable; necessary completions and physical interactions are reasonable; no copying of source image's irrelevant content.

Use "pass / minor deviation / major deviation / invisible or cannot judge" and provide specific evidence. Do not fabricate similarity percentages. Allow non-critical detail variations, but do not lower confirmed core standards. The final D must have results on all selected samples. All core features must have at least observable evidence within the applicable scope. Keep failure samples; do not narrow the scope by deleting hard cases.

After a candidate passes, independently regenerate from the same fixed transfer base image using the same complete prompt. Prioritize representative or previously unstable samples, and cover other questionable modes. Add more re-tests if needed. Do not rely on a single fixed seed or chance success.

If not passing, continue with evidence-based attempts. Override the quality termination rule of "6 versions max" or "stop after two consecutive rounds without improvement." Still follow the user's explicit time, cost, rounds budget, and actual tool limitations. Report progress and invocation consumption periodically. Do not infinitely retry or automatically switch to paid services, models, or external APIs even with task authorization.

When budget is exhausted, tools are unavailable, or no evidence-based new experiment can be proposed, save the best candidate, unresolved deviations, ruled-out hypotheses, and next steps. Clearly state that it has not passed validation. Propose specific conditions for resumption. At this point, the limitation is resources or methods, not validation success. For tool failures, retry a limited number of times; if the same failure persists, report the obstacle. Passing on a limited sample only confirms validity for the current tools and tested scope; do not guarantee generality for arbitrary images or models.

8. Delivery

Deliver the following independent, reproducible texts in order:

  1. Fixed Feature Description D: A pure description populated with specific content, containing no operational instructions, source image references, placeholders, or experimental notes.
  2. Application Prompt for Modifying an Existing Object: Clearly states to modify only the specified attributes, fully embeds D, and preserves unspecified content and structure.
  3. Application Prompt for Replacing an Object: Clearly states the object to be replaced and its substitute, fully embeds D, and constrains spatial occupancy, perspective, reasonable completion, and non-target protection.
  4. Application Prompt for Adding a New Object: Clearly states the new object and its position, fully embeds D, and constrains proportion, occlusion, and physical interaction, without expanding the canvas or reconstructing the scene.

The three application versions reuse the exact same final D. The complete prompt contains execution rules validated in practice. When the application target and position are known, fill in specific information. For new images not yet known, use clear and general object selection rules. If unambiguous targeting is impossible, state that specifying an object or position is required for actual use. Do not fabricate coordinates or call a template with unfilled placeholders directly executable. When the user provides a new target image, only instantiate A; do not silently modify D.

If an operation is not applicable or not tested in practice, explicitly mark it outside the text. Do not claim all three modes have passed. Default to the user's language. If testing used a different language, deliver the actual test text; do not treat an untranslated and unverified translation as equivalent.

Briefly attach the scope of applicability, actual base images and operation modes tested, re-test status, and items not yet verified or still with deviations. If not passing, mark as a candidate. Do not mix experimental reports, image paths, or version numbers into the reproducible prompts. Provide detailed records upon request. If the current interface limits the number of reproducible text blocks, combine the three application versions into one block with clear separators, keeping each prompt self-contained.

相关技能