AgentSkillsCN

copy-assets

将Time Fantasy系列素材中的美术/音频资源复制到Godot项目中。自动查找正确的源文件,同时复制至主仓库与工作树,并进行复制验证。适用于为游戏新增精灵、图块集,或音频资源时使用。

SKILL.md
--- frontmatter
name: copy-assets
description: Copy art/audio assets from Time Fantasy packs into the Godot project. Handles finding the right source file, copying to both main repo and worktree, and verifying the copy. Use when adding new sprites, tilesets, or audio to the game.
argument-hint: <what-you-need> [details...]

Copy Assets

Copy assets for: $ARGUMENTS

Step 1 — Identify What You Need

Determine the asset type and likely source pack:

NeedPack to SearchSubdirectory in Pack
Forest/town tilestf_fairyforest_12.28.20/1x/Root — TileA5, TileB PNGs
Ruin/dungeon tilestf_ruindungeons/16/Root — TileA5, TileB PNGs
Giant tree tilestf_giant-tree/RPGMAKER-100/Root
Farm/fort tilestf_farmandfort/Look for 16px or 1x subfolder
Character walk spritestf_fairyforest_12.28.20/1x/characters/Or beast_tribes/100/, tf_dwarfvelf_v1.2/regularsize/
NPC animationsnpc-animations/rpgmaker/1/Subfolders by NPC type
Battle spritestf_svbattle/Hero battle animations
Boss/enemy spritestf_mythicalbosses/100/Per-monster folders
Battle VFXpixel_animations_gfxpack/By element/effect type
Iconsicons_8.13.20/fullcolor/16/, 24/, 32/ sizes
Face portraitstf-faces-6.11.20/transparent/1x/Per-character PNGs
Winter tilesTimeFantasy_Winter/tiles/Root

Step 2 — Search the Source Packs

The source asset packs are at: /Users/robles/repos/games/assets/

bash
# List available packs
ls /Users/robles/repos/games/assets/

# Search within a pack for specific files
find /Users/robles/repos/games/assets/<pack-name>/ -name "*.png" | head -20

# Search by keyword across all packs
find /Users/robles/repos/games/assets/ -iname "*<keyword>*.png"

When in doubt, visually inspect the PNG using the Read tool — it displays images.

Step 3 — Determine Destination

Asset TypeDestination in game/assets/
Tile sheets (A5, B format)tilesets/
Character walk spritessprites/characters/
Building/structure spritessprites/buildings/
Enemy spritessprites/enemies/
Battle VFX spritessprites/effects/
Face portraitsportraits/
UI/item iconsicons/
Background musicaudio/bgm/
Sound effectsaudio/sfx/

Step 4 — Copy to BOTH Locations

CRITICAL: Assets must exist in the main repo (where Godot runs) AND the current worktree (if using one).

bash
# Main repo (ALWAYS do this)
MAIN_REPO="/Users/robles/repos/games/gemini-fantasy/game/assets"
mkdir -p "$MAIN_REPO/<subdir>"
cp "<source_path>" "$MAIN_REPO/<subdir>/<filename>"

# Worktree (do this if working in a worktree)
WORKTREE="/Users/robles/repos/games/gemini-fantasy/.worktrees/<branch>/game/assets"
mkdir -p "$WORKTREE/<subdir>"
cp "<source_path>" "$WORKTREE/<subdir>/<filename>"

Naming convention: Keep the original filename when possible. If renaming for clarity, use snake_case and be descriptive (e.g., kael_overworld.png, not char1.png).

Step 5 — Verify

  1. Confirm the file exists in both locations:

    bash
    ls -la /Users/robles/repos/games/gemini-fantasy/game/assets/<subdir>/<filename>
    ls -la /Users/robles/repos/games/gemini-fantasy/.worktrees/<branch>/game/assets/<subdir>/<filename>
    
  2. Check that the res:// path you'll use in GDScript maps correctly:

    • res://assets/tilesets/foo.pnggame/assets/tilesets/foo.png
    • res://assets/sprites/characters/bar.pnggame/assets/sprites/characters/bar.png
  3. Remind the user: Reopen the Godot editor after adding new PNGs so Godot generates .import files.

Step 6 — Report

List all copied assets:

  • Source path
  • Destination path (both main repo and worktree)
  • The res:// path to use in GDScript
  • Reminder to reopen Godot editor for import

Important Notes

  • PNGs are gitignored (game/assets/**/*.png) — they will NOT be committed to git
  • .import files ARE tracked — Godot generates these alongside PNGs after first import
  • If load() returns null at runtime, the asset hasn't been imported — reopen the editor
  • Always use 1x / 16px base size variants from the Time Fantasy packs
  • Use the Read tool to visually inspect PNGs before copying to confirm you have the right asset