afd-python

Implement Python AFD commands with Pydantic models and FastMCP.

4|1|Updated Dec 30, 2025
One-click install
npx skills add https://github.com/lushly-dev/afd --skill afd-python
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: afd-python
Source: https://github.com/lushly-dev/afd/tree/main/.claude/skills/afd-python
Command: npx skills add https://github.com/lushly-dev/afd --skill afd-python

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides comprehensive patterns and examples for implementing Agent-First Development (AFD) commands using Python, Pydantic, and the FastMCP framework, simplifying the creation of AI-agent-friendly applications.

Core Features & Use Cases

  • Command Definition: Learn to define commands using decorators and Pydantic models for structured input and output.
  • Schema Design: Implement robust input validation and domain modeling with Pydantic.
  • Error Handling: Master AFD's success and error response patterns for clear communication.
  • MCP Server Setup: Set up and run an MCP server for your Python AFD application.
  • Testing: Write unit and compliance tests for your AFD commands using pytest.
  • Use Case: You need to build a Python backend for an AI agent that can manage a to-do list. This Skill will guide you through defining commands like todo-create, todo-list, and todo-delete with proper input validation and response formatting.

Quick Start

Use the afd-python skill to create a new todo item with the title "Buy groceries" and high priority.

Frequently Asked Questions about afd-python

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I define AFD commands in Python using Pydantic models?

Define AFD commands in Python by using decorators alongside Pydantic models for structured input and output, ensuring robust domain modeling and validation for AI-agent-friendly applications.

What is the best way to set up an MCP server for a Python application?

Set up an MCP server for your Python application by configuring and running the FastMCP framework to expose your AFD commands to AI agents.

How does error handling work in Agent-First Development commands?

Error handling in Agent-First Development commands utilizes structured success and error response patterns to ensure clear communication and reliable execution feedback for AI agents.

Can I use pytest to write compliance tests for Python AFD commands?

Yes, you can write unit and compliance tests for Python AFD commands using pytest to validate command behavior, schema design, and response formatting.

How do I validate input schemas for an AI agent backend in Python?

Validate input schemas for an AI agent backend in Python by implementing robust domain modeling and input validation rules using Pydantic models within your AFD command definitions.

When should I use FastMCP for Python API development?

Use FastMCP for Python API development when you need to build Agent-First Development applications that expose structured, Pydantic-validated commands to AI agents via an MCP server.