FastCampus AI Agent & Vibe Coding Course Materials automates operations tasks using Python. Benefits operations teams by providing structured course materials and code examples. Integrates with Claude agents to streamline workflows and improve efficiency.
git clone https://github.com/Koomook/fastcampus-ai-agent-vibecoding.gitFastCampus AI Agent & Vibe Coding Course Materials automates operations tasks using Python. Benefits operations teams by providing structured course materials and code examples. Integrates with Claude agents to streamline workflows and improve efficiency.
["Identify your automation task and gather requirements (e.g., 'I need to process customer support tickets daily').","Customize the prompt template with your specific task details, error cases, and desired outputs.","Run the generated script in your Python environment (ensure you have the FastCampus AI Agent library installed: `pip install fastcampus-ai-agent`).","Test the script with sample data and adjust error handling as needed. Use the logging output to identify issues.","Schedule the script using cron (Linux) or Task Scheduler (Windows), or integrate it with FastCampus's automation platform for production use."]
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/Koomook/fastcampus-ai-agent-vibecodingCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Generate a Python script using the FastCampus AI Agent & Vibe Coding methodology to automate [TASK_DESCRIPTION]. Include error handling for [COMMON_ERRORS], logging to [LOG_FILE_PATH], and modular functions for [SPECIFIC_FUNCTIONS]. Use the FastCampus AI Agent framework to structure the code with clear comments and docstrings. Example: 'Generate a Python script to automate weekly sales report generation for FastCampus. Include error handling for API timeouts, logging to /var/log/fastcampus/report.log, and modular functions for data fetching, formatting, and email distribution.'
```python
# FastCampus AI Agent & Vibe Coding - Weekly Sales Report Automation
# Generated: 2024-05-20 | Version: 1.2
# Author: AI Agent
import os
import json
import logging
from datetime import datetime, timedelta
from typing import Dict, List
import requests
from fastcampus_ai_agent import FastCampusAgent
# Configure logging
logging.basicConfig(
filename='/var/log/fastcampus/weekly_sales_report.log',
level=logging.INFO,
format='%(asctime)s - %(levelname)s - %(message)s'
)
class SalesReportAutomation(FastCampusAgent):
def __init__(self):
super().__init__()
self.api_endpoint = os.getenv('SALES_API_ENDPOINT', 'https://api.fastcampus.com/sales')
self.api_key = os.getenv('SALES_API_KEY')
self.report_date = (datetime.now() - timedelta(days=7)).strftime('%Y-%m-%d')
def fetch_sales_data(self) -> Dict:
"""Fetch sales data from FastCampus API with error handling"""
try:
headers = {'Authorization': f'Bearer {self.api_key}'}
params = {'start_date': self.report_date, 'end_date': datetime.now().strftime('%Y-%m-%d')}
response = requests.get(f'{self.api_endpoint}/weekly', headers=headers, params=params, timeout=30)
response.raise_for_status()
return response.json()
except requests.exceptions.Timeout:
logging.error('API timeout occurred while fetching sales data')
raise
except requests.exceptions.RequestException as e:
logging.error(f'API request failed: {str(e)}')
raise
def format_report(self, data: Dict) -> str:
"""Format sales data into a readable report"""
report_lines = [
f"FastCampus Weekly Sales Report - {self.report_date} to {datetime.now().strftime('%Y-%m-%d')}",
"="*60,
f"Total Revenue: ${data['total_revenue']:,.2f}",
f"Total Orders: {data['total_orders']:,}",
f"Average Order Value: ${data['avg_order_value']:,.2f}",
"\nTop 5 Products by Revenue:"
]
for product in data['top_products'][:5]:
report_lines.append(f"- {product['name']}: ${product['revenue']:,.2f} ({product['quantity']} units)")
return '\n'.join(report_lines)
def send_email_report(self, report: str) -> bool:
"""Send formatted report via email using FastCampus email service"""
try:
email_payload = {
'to': os.getenv('REPORT_EMAIL_RECIPIENTS', 'sales@fastcampus.com'),
'subject': f'Weekly Sales Report - {self.report_date}',
'body': report
}
response = requests.post(
f'{self.api_endpoint}/email',
json=email_payload,
headers={'Authorization': f'Bearer {self.api_key}'},
timeout=15
)
response.raise_for_status()
logging.info('Email report sent successfully')
return True
except Exception as e:
logging.error(f'Failed to send email report: {str(e)}')
return False
if __name__ == '__main__':
try:
agent = SalesReportAutomation()
sales_data = agent.fetch_sales_data()
report = agent.format_report(sales_data)
success = agent.send_email_report(report)
if success:
print(f"Report generated and sent successfully. Check logs at /var/log/fastcampus/weekly_sales_report.log")
else:
print("Report generated but failed to send. Check error logs.")
except Exception as e:
print(f"Automation failed: {str(e)}. Check /var/log/fastcampus/weekly_sales_report.log for details")
```
This Python script demonstrates the FastCampus AI Agent & Vibe Coding methodology by:
1. Creating a modular class that inherits from FastCampusAgent
2. Implementing three core functions (data fetching, formatting, email distribution)
3. Including comprehensive error handling and logging
4. Using environment variables for configuration
5. Following Python best practices with type hints and docstrings
The script can be scheduled to run weekly using cron or FastCampus's automation scheduler. The logging ensures any issues are immediately visible, and the modular structure allows for easy extension to include additional metrics or recipients.Nouns DAO governance client
save organize and showcase your mental dump
IronCalc is a spreadsheet engine and ecosystem
Customer feedback management made simple
Enterprise workflow automation and service management platform
Automate your spreadsheet tasks with AI power
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan