AgentSkillsCN

Code

代码

SKILL.md

Code File Generation Skill

Overview

Creates code files in various programming languages with proper syntax and structure.

Capabilities

  • Python scripts (.py)
  • JavaScript/TypeScript files (.js, .ts)
  • HTML/CSS files
  • React components (.jsx, .tsx)
  • JSON configuration files
  • Shell scripts (.sh)
  • Any text-based code file

Supported Languages

  • Python
  • JavaScript/TypeScript
  • HTML/CSS
  • React/Vue/Angular
  • SQL
  • Shell/Bash
  • YAML/JSON
  • Markdown

Best Practices

  1. Include appropriate file headers/comments
  2. Follow language-specific conventions (PEP8 for Python, etc.)
  3. Use meaningful variable/function names
  4. Include error handling
  5. Add documentation/docstrings
  6. Structure code logically
  7. Include any necessary imports

Template Structure (Python)

python
#!/usr/bin/env python3
"""
Module description here.
Generated by MimaarAI
"""

import sys
from typing import Optional

def main() -> None:
    """Main function."""
    # Implementation here
    pass

if __name__ == "__main__":
    main()

Template Structure (JavaScript)

javascript
/**
 * Module description here.
 * Generated by MimaarAI
 */

'use strict';

const module = {
  // Implementation here
};

module.exports = module;

Quality Checklist

  • Syntax is correct
  • Imports are present
  • Functions are documented
  • Error handling included
  • Code is properly indented
  • Follows language conventions