Loading...
Loading...
AI Text Generation Tool: Uses large language models to generate text content based on prompts, supporting combined understanding of images/videos/text. Available models include GEM_3_FLASH (fast response) and GEM_3_1_PRO (high-quality complex analysis). Triggered when users mention phrases like "AI text generation", "AI writing", "text generation", "help me write a paragraph", "text generation", "generate text", "write with AI", "AI analyze image content", "image recognition", "video analysis".
npx skill4agent add linkfox-ai/linkfox-skills linkfox-aigc-textgenimageUrls| Model | Description | Applicable Scenarios |
|---|---|---|
| GEM_3_FLASH | Fast response (default) | General copywriting, simple analysis, translation |
| GEM_3_1_PRO | High-quality complex analysis | In-depth analysis, long-form writing, complex reasoning |
| thinkingLevel | Description |
|---|---|
| minimal | Almost no thinking (not supported by GEM_3_1_PRO) |
| low | Low thinking depth |
| medium | Balanced |
| high | Maximum reasoning depth |
promptimageUrls[]thinkingLevelminimalimageUrls["https://example.com/ref.mp4"]videoUrlvideoUrlsreferences/api.mdPOST /aigc/textGenAsynctaskIdPOST /aigc/textTaskQueryPROCESSINGSUCCESSFAILEDpython scripts/aigc_textgen.py --stdinpython scripts/aigc_textgen.py --stdin < params.jsonpython scripts/aigc_textgen.py --stdin --content-onlypython scripts/aigc_textgen.py '<JSON parameters>' [--inline]Polling Strategy: Single HTTP timeout is 150 seconds; polling interval decreases from 10 seconds to 5 seconds; maximum total polling duration is 600 seconds. Complete parameters/responses/error codes can be found in.references/api.md
Line Break Flattening is Enabled by Default (no flag required): In all output modes, line breaks in content are automatically replaced with the single character(U+23CE), turning the entire content into a single line;⏎only changes "output content text vs complete JSON", and does not affect this flattening behavior.--content-only
json.loads--content-only--inline{"ok":bool, "truncated":true, "savedPath":"<path>", "bytes":int, "content":"<single-line text>"}0errcodestatus==FAILEDjson.loads(stdout)contentcontentjqsavedPathLINKFOX_AGENT_API_KEYLINKFOXAGENT_API_KEYAgents must follow the following decision tree, and automatically execute upon reading the rules without requiring step-by-step user instructions.
Does the user's subsequent request involve image generation / text-to-image / model replacement / video / imagegen / videogen?
│
├─ YES ──→ Use --content-only mode (line breaks have been flattened to single character ⏎, which can be safely inline concatenated)
│ Capture stdout → inline concatenate into downstream parameter JSON → call downstream Skill
│
└─ NO ──→ Use default mode
Small result → json.loads(stdout) to get content
Large result → read content from stdout JSON envelope, or extract using jq according to savedPathcontent⏎\n⏎⏎decode_nl_in_obj# ── Step 1: Generate text, use --content-only to directly get single-line content (line breaks are already ⏎), capture into variable ──────
PROMPT=$(python scripts/aigc_textgen.py --stdin --content-only < textgen_params.json)
# ── Step 2: Inline concatenate into downstream parameters and call downstream Skill (jq handles correct JSON escaping) ───────────
PARAMS=$(jq -nc --arg p "$PROMPT" \
'{"prompt":$p, "imageUrls":["https://example.com/ref.jpg"], "provider":"BANANA_PRO", "outputNum":1, "resolution":"1K", "aspectRatio":"1:1"}')
python ../linkfox-aigc-imagegen/scripts/aigc_imagegen.py "$PARAMS"
# Downstream script automatically restores ⏎ to line breaks after receivingWithout, you can directly inlinejqinto single-quoted JSON: since$PROMPTdoes not need to be escaped and there are no real line breaks, it can also be safely concatenated (provided that content does not contain double quotes; use⏎first if it does).jq
| Downstream Skill | Key Fields (adjust as needed, prompt is injected by upstream) |
|---|---|
| linkfox-aigc-imagegen | |
| linkfox-aigc-videogen | |
| linkfox-aigc-imagegen-cloth | |
| linkfox-aigc-imagegen-product | |
GEM_3_FLASHGEM_3_1_PROimageUrls[].mp4GEM_3_1_PROthinkingLevel: lowminimallowhigh10005imageUrls{"prompt": "Write a compelling product description for a wireless bluetooth speaker, highlighting portability and sound quality", "imageUrls": [], "thinkingLevel": "minimal"}{"prompt": "Analyze the composition and selling point expression of this product main image", "imageUrls": ["https://example.com/product-main.jpg"], "model": "GEM_3_1_PRO", "thinkingLevel": "high"}{"prompt": "Analyze the shot rhythm, selling point expression and replicable shot structure of this reference video", "imageUrls": ["https://example.com/reference.mp4"], "model": "GEM_3_1_PRO", "thinkingLevel": "low"}{"prompt": "Translate to German: 'Wireless Bluetooth Speaker with LED Light'", "imageUrls": [], "model": "GEM_3_FLASH", "thinkingLevel": "low"}imageUrlsGEM_3_1_PROminimallinkfox-aigc-imagegenlinkfox-aigc-videogenlinkfox-report-generatorreferences/api.md