AgentSkillsCN

dmtools

DMtools的全面文档与技术支持——这是一款由AI驱动的开发工具包,内置96+种MCP工具,可用于Jira、Azure DevOps、Figma、Confluence、Teams,以及测试自动化。适用于在使用DMtools、配置集成、开发JavaScript智能体,或生成测试用例时使用。

SKILL.md
--- frontmatter
name: dmtools
description: Comprehensive documentation and assistance for DMtools - AI-powered development toolkit with 96+ MCP tools for Jira, Azure DevOps, Figma, Confluence, Teams, and test automation. Use when working with DMtools, configuring integrations, developing JavaScript agents, or generating test cases.
license: Apache-2.0
compatibility:
  - Java 23+
  - macOS, Linux, Windows (WSL)
metadata:
  version: 1.0.15
  author: DMtools Team
  repository: https://github.com/IstiN/dmtools
  documentation: https://github.com/IstiN/dmtools

DMtools Development Assistant

Comprehensive knowledge base for DMtools - an AI-powered development toolkit that integrates with multiple platforms and provides 96+ MCP tools for automation.

When to Use

Use this skill when:

  • Installing or configuring DMtools
  • Setting up integrations (Jira, Azure DevOps, Figma, Confluence, Teams)
  • Configuring AI providers (Gemini, OpenAI, Claude, DIAL, Ollama)
  • Developing JavaScript agents with MCP tools
  • Generating test cases (Xray, Cucumber)
  • Troubleshooting DMtools issues
  • Working with dmtools.env configuration
  • Creating AI teammate configurations

Quick Reference

Installation

bash
# Step 1: Install DMtools
curl -fsSL https://raw.githubusercontent.com/IstiN/dmtools/main/install.sh | bash

⚠️ CRITICAL: After installation, you must configure dmtools.env file:

Basic Configuration

Create dmtools.env in your project or home directory:

bash
# dmtools.env - NEVER commit this file (contains secrets)

# Jira (Required for Jira tools)
JIRA_BASE_PATH=https://company.atlassian.net
JIRA_EMAIL=your-email@company.com
JIRA_API_TOKEN=your-jira-api-token
JIRA_AUTH_TYPE=Basic

# AI Provider (Required for AI features - choose one)
GEMINI_API_KEY=your-gemini-api-key    # Free tier: 15 req/min
# OR
OPEN_AI_API_KEY=your-openai-api-key
# OR
BEDROCK_ACCESS_KEY_ID=your-aws-key
BEDROCK_SECRET_ACCESS_KEY=your-aws-secret

# Defaults
DEFAULT_LLM=gemini
DEFAULT_TRACKER=jira

Get API tokens:

See Installation Guide for complete setup.

Common Commands

bash
dmtools list                          # List all 96+ MCP tools
dmtools jira_get_ticket PROJ-123      # Get Jira ticket
dmtools run agents/config.json        # Run configuration

Core Capabilities

96+ MCP Tools Available

Complete Reference: references/mcp-tools/README.md - Auto-generated from actual DMtools build

Current breakdown:

  • Jira (52 tools): Ticket management, search, comments, Xray test management
  • Teams (27 tools): Messages, chats, files, transcripts
  • Figma: Design extraction, icons, layers, styles
  • Confluence: Page management, search, content access
  • Teams: Messages, chats, files, transcripts
  • AI: Gemini, OpenAI, Claude (Bedrock), DIAL, Ollama
  • File & CLI: File operations, command execution
  • SharePoint, KB, and more

Example tools:

  • jira_get_ticket, jira_search_by_jql, jira_xray_create_test
  • ado_get_work_item, ado_move_to_state, ado_add_comment
  • figma_get_layers, figma_get_icons, figma_download_node_image
  • teams_send_message, teams_messages_since, teams_download_file
  • gemini_ai_chat, openai_ai_chat, bedrock_ai_chat

JavaScript Agent Pattern

All MCP tools are directly accessible as JavaScript functions in agents:

javascript
function action(params) {
    try {
        // Direct MCP tool access
        const ticket = jira_get_ticket(params.ticketKey);
        const analysis = gemini_ai_chat(`Analyze: ${ticket.fields.description}`);

        // Process and return
        return { success: true, result: analysis };
    } catch (error) {
        return { success: false, error: error.toString() };
    }
}

Detailed Documentation

Installation & Setup

Configuration Guides

Jobs & Workflows

Development

CI/CD Workflows

⚠️ CRITICAL: JSON Configuration "name" Field

Before using any job configuration, understand this:

The "name" field in JSON configs is NOT a user-defined name. It is a Java class name (technical identifier).

json
{
  "name": "TestCasesGenerator"  // ← Exact Java class name (immutable)
}
  • DO: Use exact name from docs: TestCasesGenerator, Teammate, Expert
  • DON'T: Change it to "My Test Generator" or "test-generator"

Why? DMtools maps this name directly to Java code: "TestCasesGenerator"new TestCasesGenerator()

See JSON Configuration Rules for details.


Common Tasks

Configure Jira Integration

bash
# 1. Generate API token at https://id.atlassian.com/manage-profile/security/api-tokens
# 2. Encode credentials
echo -n "email@company.com:token" | base64
# 3. Add to dmtools.env
JIRA_BASE_PATH=https://company.atlassian.net
JIRA_LOGIN_PASS_TOKEN=base64_output_here

Generate Test Cases

IMPORTANT: "name" must exactly match Job class name. See JSON Configuration Rules.

json
{
  "name": "TestCasesGenerator",
  "params": {
    "inputJql": "project = PROJ AND type = Story",
    "testCasesPriorities": "High, Medium, Low",
    "outputType": "creation",
    "testCaseIssueType": "Test",
    "existingTestCasesJql": "project = PROJ AND type = Test",
    "isFindRelated": true,
    "isGenerateNew": true
  }
}

Create JavaScript Agent

javascript
// agents/js/processTickets.js
function action(params) {
    const tickets = jira_search_by_jql(params.jql);

    for (const ticket of tickets) {
        // Process with AI
        const result = gemini_ai_chat(`Analyze: ${ticket.fields.summary}`);

        // Update ticket
        jira_post_comment(ticket.key, result);
    }

    return { processed: tickets.length };
}

Best Practices

  1. Security: Never commit credentials - use environment variables
  2. AI Provider: Start with Gemini (free tier, 15 req/min)
  3. Testing: Mock external APIs with Mockito
  4. Batch Processing: Add delays to avoid rate limits
  5. Error Handling: Always use try-catch in agents

Troubleshooting Quick Reference

IssueSolution
"Java 23 required"Run installer again, it auto-installs Java
"401 Unauthorized"Check base64 encoding of Jira credentials
"Rate limit exceeded"Add sleep(1000) between API calls
"Field not found"Use jira_get_fields to find custom field IDs

Architecture Notes

  • Job System: 20+ specialized jobs for workflows
  • Agent System: Java and JavaScript agents for AI tasks
  • Configuration: Hierarchy - env vars > dmtools.env > dmtools-local.env
  • Thread Safety: JobContext with thread-local storage
  • DI Framework: Dagger 2 for dependency injection

Resources

Ask Questions

If you need clarification on requirements or implementation details, ask the user for more information before proceeding.