iFly-Skills

repository·main·Indexed 42 days ago

https://github.com/iflytek/ifly-skills

A centralized repository of iFLYTEK AI capabilities providing reusable skills for speech, OCR, translation, and multimodal tasks. Available skills include Hyper TTS, Image Understanding, Invoice and PDF/Image OCR, Speed Transcription, Text Proofread, Machine Translation, Video Translate, Voice Clone TTS, Contract Intelligence Review, and Animated Sketch Diagram.

Tokens
32.2K
Snippets
86
Records
152
Agent score
45%

What's inside iFly-Skills

  1. What is Animated Sketch Diagram?

    main
    Animated Sketch Diagram is a tool that generates hand-drawn, "ink on beige paper" style animated architecture and flow diagrams. The output is a single, self-contained HTML file using pure SVG and CSS (with zero JavaScript runtime) that utilizes @keyframes and offset-path to animate flowing dots tracing system topologies like branches, merges, and feedback loops. It is designed to narrate architecture through motion rather than just decoration.
  2. Overview of Contract Intelligence Review Skill

    main

    The Contract Intelligence Review Skill is a scenario orchestration layer designed to coordinate the entire contract review workflow. Rather than being a single atomic API, it integrates multiple capabilities including document recognition (OCR), text extraction, clause analysis, risk detection, compliance checking, and translation to produce a structured review report.

    Supported Scenarios

    • Scanned PDF Review: Uses OCR to process scanned documents.
    • Image Contract Review: Processes photos or screenshots of contracts.
    • Text Contract Review: Processes editable formats like Word, Markdown, or TXT.
    • Bilingual Contract Review: Checks consistency in Chinese-English bilingual contracts.
    • Specialized Clause Review: Focuses on specific areas like payment, liability, renewal, or IP.
    • Quick Risk Scanning: Outputs only key risk points.
    • Deep Review: Provides full clause analysis, compliance checking, and translation summaries.
  3. Overview of iFly-Skills

    main
    iFly-Skills is the official collection of AI Skills from iFLYTEK, designed for the Agent ecosystem and developer workflows. It serves as a centralized repository of reusable skills built on iFLYTEK's atomic AI capabilities, including speech, OCR, translation, text proofreading, and multimodal understanding. The project provides a unified platform for packaging, versioning, maintaining, and publishing skills to make iFLYTEK's capabilities easily installable and composable within agent-based ecosystems.
  4. Overview of Animated Sketch Diagram Skill

    main

    The animated-sketch-diagram skill generates animated architecture diagrams or flowcharts in a "black ink hand-drawn doodle" style.

    Visual Characteristics:

    • Beige paper background with black ink shaky strokes.
    • Very light watercolor-style color blocks.
    • Simple doodle icons (e.g., people, documents, boxes, moons).
    • Numbered stamps and decorative elements (✦).
    • Animated flowing dots along connection lines and subtle icon micro-animations.
    • Output is a self-contained HTML file (inline SVG + CSS) that can be exported to a seamless looping GIF.

    Use Cases: Use this skill when users want to visualize architecture diagrams, flowcharts, infographics, technical diagrams, comparison charts, or pipelines/workflows, especially when they mention "hand-drawn style", "doodle style", "animated diagram", or "GIF architecture diagram".

  5. How to achieve a hand-drawn look in SVG

    main

    To create the signature hand-drawn (sketchy) aesthetic, do not manually simulate shaky lines. Instead, add the data-rough attribute to any static geometric shape (<rect>, <path>, <circle>, etc.).

    By default, the system uses data-roughness="1.8". The rough.js and sketchify.js libraries will automatically replace these elements with jittery, hand-drawn versions upon loading.

    CRITICAL EXCEPTION: Do NOT add data-rough to elements that participate in CSS animations (e.g., flowing dots, rotating gears, or drawing checkmarks). The rough.js replacement process targets static visual copies; attaching animations to the replaced elements will make them invisible.

    <!-- Static shape with hand-drawn effect -->
    <rect data-rough data-roughness="1.8" x="10" y="10" width="100" height="100" />
    
    <!-- Animated element (DO NOT add data-rough) -->
    <circle class="flowing-dot" cx="50" cy="50" r="5" />
  6. Limitations of ifly-pdf-image-ocr

    main

    Image OCR

    • Format: Common image formats (JPG, PNG, etc.).
    • Size: Reasonable file sizes for web upload.
    • Rate limiting: Follow API rate limits.

    PDF OCR

    • Max pages: 100 pages per PDF.
    • Protected PDFs: Not supported (password/encrypted).
    • Rate limiting: Status query limited to once per 5 seconds.
    • Time limit: Timestamp must be within ±5 minutes of server time.
  7. Understand PDF OCR task statuses

    main

    When performing PDF OCR, the process is asynchronous. You can monitor the status of your task using the status field in the response.

    Available Statuses:

    • CREATE: Task created successfully.
    • WAITING: Waiting in queue.
    • DOING: Processing.
    • FINISH: Completed.
    • FAILED: Failed.
    • ANY_FAILED: Partially completed (some pages failed).
    • STOP: Paused.
  8. Technical Constraints for HTML/SVG Animation

    main

    To ensure compatibility with the GIF rendering script and to guarantee seamless looping, all generated HTML files must adhere to these technical constraints:

    1. Animation Method: Use CSS Animations (@keyframes + offset-path) only. Do not use SMIL <animate> or JavaScript-driven animations, as the recording script relies on document.getAnimations() to capture frames.
    2. Looping: All animation-duration values must be divisible by the global loop duration --loop (default is 3000ms). Animations must use infinite to ensure a seamless loop.
    3. Self-Containment: All fonts must be inlined using base64 to ensure the file is self-contained and works offline.
    4. Icon Implementation: Icons should be embedded as data URIs within <image> tags to avoid external URL dependencies.
  9. Understand iFly Text Proofread error types and output

    main

    The proofreading service covers several categories of issues:

    Error Types

    • Text and Punctuation Errors: Typos, extra characters, missing characters, semantic repetition, word order errors, quantifier/unit errors, number errors, and punctuation errors.
    • Knowledge-based Errors: Organization names, proper nouns, common sense errors, and banned/cautious media terms.
    • Content Risks: Vulgarity, insults, and other sensitive content.

    Output Behavior

    • Default Mode: Outputs human-readable proofreading results. If no issues are found, it notifies that the text passed proofreading. If issues are found, it lists the error type, the original text fragment, and the suggested correction.
    • Raw Mode (--raw): Outputs the decoded original JSON response from the API.

    Technical Constraints

    • Text fields in requests and responses are Base64 encoded.
    • Authentication uses HMAC-SHA256.
  10. Understand the contract intelligence review workflow

    main

    The skill follows an 8-step pipeline to transform raw documents into a structured risk report:

    1. Input Recognition: Automatic file type detection and readability assessment.
    2. Content Extraction: OCR recognition or direct text extraction.
    3. Text Cleaning: Filtering garbled characters and paragraph restructuring.
    4. Clause Segmentation: Clause numbering recognition and title extraction.
    5. Risk Detection: Scanning for payment, liability, renewal, IP, confidentiality, and dispute risks.
    6. Compliance Check: Verifying terminology consistency and formatting standards.
    7. Bilingual Check: Verifying consistency between Chinese and English text.
    8. Report Generation: Final output in Markdown or JSON format.