Skip to content

grahama1970/agent_tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

50 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ› ๏ธ Cursor Agent Tools

A collection of specialized tools designed to enhance AI agent capabilities within the Cursor IDE. These tools enable more intelligent code analysis, validation, and generation while preventing common AI pitfalls like method hallucination and redundant implementations.

๐ŸŽฏ Purpose

This repository contains a growing collection of tools that help AI agents (like myself) work more effectively within Cursor. Each tool is designed to solve specific challenges in AI-assisted development:

  • Preventing method hallucination
  • Validating API usage
  • Discovering existing functionality
  • Ensuring correct implementation patterns
  • Maintaining code quality and consistency

๐Ÿ“ฆ Available Tools

Method Validator โœ…

The Method Validator is a specialized tool that helps AI agents analyze Python packages, discover existing methods, and validate APIs before implementing new solutions. This prevents redundant code creation and ensures correct API usage.

Key features:

  • Smart package analysis with filtering of standard libraries
  • Detailed method discovery and validation
  • Intelligent categorization of methods
  • Exception pattern analysis
  • Optimized caching system
  • Machine-readable output for automated processing

Learn more about Method Validator

๐Ÿš€ Getting Started

Installation

# Clone the repository
git clone https://github.com/your-org/agent-tools.git
cd agent-tools

# Install in development mode
pip install -e .

Using with Cursor

These tools are designed to be used seamlessly within the Cursor IDE. When working with an AI agent in Cursor, you can trigger specific tools using designated prompts:

TOOL: method_validator - Implement [task description]

Example:

TOOL: method_validator - Write a function to extract tables from a webpage using Playwright

๐Ÿ—๏ธ Project Structure

agent_tools/
โ”œโ”€โ”€ src/
โ”‚   โ””โ”€โ”€ agent_tools/
โ”‚       โ”œโ”€โ”€ method_validator/       # Method validation tool
โ”‚       โ”‚   โ”œโ”€โ”€ analyzer.py        # Core analysis logic
โ”‚       โ”‚   โ”œโ”€โ”€ cache.py          # Caching system
โ”‚       โ”‚   โ”œโ”€โ”€ cli.py            # Command-line interface
โ”‚       โ”‚   โ””โ”€โ”€ README.md         # Tool-specific documentation
โ”‚       โ””โ”€โ”€ [future tools...]     # Additional tools will be added here
โ”œโ”€โ”€ tests/                        # Test suite
โ”œโ”€โ”€ examples/                     # Usage examples
โ””โ”€โ”€ README.md                     # This file

๐ŸŽฏ Design Philosophy

  1. Prevention Over Correction

    • Tools focus on preventing common AI mistakes rather than fixing them after the fact
    • Built-in validation and verification at every step
  2. Intelligent Caching

    • Optimized caching systems to improve response times
    • Smart invalidation based on source changes
  3. Machine-First Design

    • All tools provide machine-readable output
    • Structured data formats for easy parsing
    • Clear success/failure indicators
  4. Progressive Enhancement

    • Tools work with basic functionality out of the box
    • Advanced features available for more complex use cases

๐Ÿค Contributing

Contributions are welcome! If you have ideas for new tools or improvements to existing ones, please:

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Open a pull request

Please ensure your contributions maintain or enhance the tools' autonomous operation capabilities.

๐Ÿ“ License

MIT License

๐Ÿ”ฎ Future Tools

We plan to add more tools to this repository, including:

  • Code Pattern Analyzer
  • Dependency Graph Generator
  • Test Case Validator
  • Documentation Analyzer
  • Type Inference Helper

Stay tuned for updates!

๐Ÿš€ Next Steps

We are actively developing additional agent tools for various technologies and platforms:

Database Tools

  • ArangoDB Agent Tools: Smart graph database operations, query optimization, and schema validation
  • Database Migration Assistant: Intelligent schema evolution and data transformation
  • Database Schema Creator for LLM consumption: Intelligent schema evolution and data transformation

Infrastructure Tools

  • Docker Agent Tools: Container optimization, security scanning, and deployment validation
  • Infrastructure as Code Validator: Template verification and best practices enforcement

Development Tools

  • GitHub Integration Tools: PR analysis, code review automation, and workflow optimization
  • Local LLM Tools: Integration with local language models for privacy-sensitive operations

Additional Planned Tools

  • CI/CD Pipeline Validator
  • Security Compliance Checker
  • Performance Optimization Analyzer
  • Cross-Platform Compatibility Validator
  • API Integration Assistant
  • Cloud Resource Optimizer

Each tool will follow our core design principles of prevention over correction, intelligent caching, and machine-first design while providing specific capabilities for its target technology.

๐Ÿ”— Related Projects

โš ๏ธ Note for Human Developers

While these tools are primarily designed for AI agents, they can also be valuable for human developers:

  • Use Method Validator to explore unfamiliar packages
  • Leverage automated API discovery
  • Benefit from intelligent caching and analysis

However, the primary focus remains on enhancing AI agent capabilities within Cursor.

Testing

This project uses pytest for testing. The test suite includes both unit tests and integration tests.

Running Tests

To run the test suite:

pytest tests/

For test coverage report:

pytest --cov=agent_tools tests/

Test Structure

  • tests/unit/: Unit tests for individual components
  • tests/integration/: Integration tests for end-to-end functionality

Writing Tests

When contributing to this project:

  1. All code changes must include corresponding tests
  2. Follow the AAA pattern (Arrange-Act-Assert)
  3. Use pytest fixtures for common setup
  4. Mock external dependencies appropriately
  5. Ensure both new and existing tests pass

Test Coverage Requirements

  • Unit tests for all new functions/methods
  • Integration tests for feature changes
  • Edge case coverage
  • Minimum 80% coverage for new code

Continuous Integration

Tests are automatically run on:

  • Every pull request
  • Every merge to main branch
  • Every release tag

Cursor Patterns

A centralized repository of Cursor MDC rules and design patterns for consistent code generation across projects.

Structure

cursor-patterns/
โ”œโ”€โ”€ rules/              # All MDC rules
โ”‚   โ”œโ”€โ”€ core/          # Core rules (code advice, design patterns index)
โ”‚   โ”œโ”€โ”€ design_patterns/  # Specific design pattern implementations
โ”‚   โ””โ”€โ”€ project_specific/ # Language-specific patterns
โ”œโ”€โ”€ scripts/           # Installation and update scripts
โ””โ”€โ”€ README.md

Installation

  1. Clone this repository:
git clone https://github.com/yourusername/cursor-patterns
  1. Run the installation script:
cd cursor-patterns
chmod +x scripts/install.sh
./scripts/install.sh

Updating

To update your patterns to the latest version:

chmod +x scripts/update.sh
./scripts/update.sh

This will create a backup of your current rules before updating.

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

Adding New Patterns

  1. Create a new .mdc file in the appropriate directory
  2. Follow the MDC format:
    • Include clear frontmatter (name, version, author, etc.)
    • Add specific glob patterns
    • Define clear triggers
    • Document the pattern thoroughly
  3. Update the index file if necessary
  4. Test the pattern in a real project
  5. Submit a pull request

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •