Files
antigravity-skills-reference/skills/telegram/scripts/setup_project.py
ProgramadorBrasil 61ec71c5c7 feat: add 52 specialized AI agent skills (#217)
New skills covering 10 categories:

**Security & Audit**: 007 (STRIDE/PASTA/OWASP), cred-omega (secrets management)
**AI Personas**: Karpathy, Hinton, Sutskever, LeCun (4 sub-skills), Altman, Musk, Gates, Jobs, Buffett
**Multi-agent Orchestration**: agent-orchestrator, task-intelligence, multi-advisor
**Code Analysis**: matematico-tao (Terence Tao-inspired mathematical code analysis)
**Social & Messaging**: Instagram Graph API, Telegram Bot, WhatsApp Cloud API, social-orchestrator
**Image Generation**: AI Studio (Gemini), Stability AI, ComfyUI Gateway, image-studio router
**Brazilian Domain**: 6 auction specialist modules, 2 legal advisors, auctioneers data scraper
**Product & Growth**: design, invention, monetization, analytics, growth engine
**DevOps & LLM Ops**: Docker/CI-CD/AWS, RAG/embeddings/fine-tuning
**Skill Governance**: installer, sentinel auditor, context management

Each skill includes:
- Standardized YAML frontmatter (name, description, risk, source, tags, tools)
- Structured sections (Overview, When to Use, How it Works, Best Practices)
- Python scripts and reference documentation where applicable
- Cross-platform compatibility (Claude Code, Antigravity, Cursor, Gemini CLI, Codex CLI)

Co-authored-by: ProgramadorBrasil <214873561+ProgramadorBrasil@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 10:04:07 +01:00

104 lines
3.6 KiB
Python

#!/usr/bin/env python3
"""
Setup a new Telegram Bot project with boilerplate code.
Usage:
python setup_project.py --language nodejs --path ./my-telegram-bot
python setup_project.py --language python --path ./my-telegram-bot
python setup_project.py --language python --path ./my-bot --with-webhook --with-ai
"""
import argparse
import os
import shutil
import sys
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
SKILL_DIR = os.path.dirname(SCRIPT_DIR)
BOILERPLATE_DIR = os.path.join(SKILL_DIR, "assets", "boilerplate")
def setup_nodejs(project_path: str, with_webhook: bool = False, with_ai: bool = False):
"""Setup Node.js/TypeScript project."""
src_dir = os.path.join(BOILERPLATE_DIR, "nodejs")
if not os.path.exists(src_dir):
print(f"ERROR: Boilerplate not found at {src_dir}")
sys.exit(1)
# Copy boilerplate
shutil.copytree(src_dir, project_path, dirs_exist_ok=True)
print(f"Node.js project created at: {project_path}")
print("\nNext steps:")
print(f" 1. cd {project_path}")
print(" 2. npm install")
print(" 3. Copy .env.example to .env and add your bot token")
print(" 4. npm run dev (development with hot reload)")
print(" 5. npm run build && npm start (production)")
if with_webhook:
print("\n Webhook mode enabled - configure WEBHOOK_URL in .env")
if with_ai:
print("\n AI integration enabled - configure ANTHROPIC_API_KEY in .env")
def setup_python(project_path: str, with_webhook: bool = False, with_ai: bool = False):
"""Setup Python project."""
src_dir = os.path.join(BOILERPLATE_DIR, "python")
if not os.path.exists(src_dir):
print(f"ERROR: Boilerplate not found at {src_dir}")
sys.exit(1)
# Copy boilerplate
shutil.copytree(src_dir, project_path, dirs_exist_ok=True)
print(f"Python project created at: {project_path}")
print("\nNext steps:")
print(f" 1. cd {project_path}")
print(" 2. pip install -r requirements.txt")
print(" 3. Copy .env.example to .env and add your bot token")
print(" 4. python bot.py (long polling mode)")
if with_webhook:
print(" 5. python webhook_server.py (webhook mode)")
if with_ai:
print("\n AI integration enabled - configure ANTHROPIC_API_KEY in .env")
def main():
parser = argparse.ArgumentParser(description="Setup Telegram Bot project")
parser.add_argument("--language", type=str, required=True,
choices=["nodejs", "python"],
help="Project language")
parser.add_argument("--path", type=str, required=True,
help="Project directory path")
parser.add_argument("--with-webhook", action="store_true",
help="Include webhook server setup")
parser.add_argument("--with-ai", action="store_true",
help="Include AI integration boilerplate")
parser.add_argument("--force", action="store_true",
help="Overwrite existing directory")
args = parser.parse_args()
project_path = os.path.abspath(args.path)
if os.path.exists(project_path) and not args.force:
print(f"ERROR: Directory already exists: {project_path}")
print("Use --force to overwrite")
sys.exit(1)
os.makedirs(project_path, exist_ok=True)
if args.language == "nodejs":
setup_nodejs(project_path, args.with_webhook, args.with_ai)
elif args.language == "python":
setup_python(project_path, args.with_webhook, args.with_ai)
print("\nDone!")
if __name__ == "__main__":
main()