Generates customizable document templates for reports, proposals, invoices, and contracts
Generates customizable document templates for reports, proposals, invoices, and contracts
Document Template Engine is a production-ready tool skill designed for Office Productivity workflows. Built with industry best practices, it provides reliable, efficient, and scalable capabilities for modern AI applications.
# Install via SkillsHub CLI
skillshub install docforge/Document-Template-Engine
# Or install via pip
pip install skillshub-document-template-engine
# Or install via npm
npm install @skillshub/document-template-engine
from skillshub import load_skill
skill = load_skill("docforge/Document-Template-Engine")
# Initialize with configuration
skill.configure({
"model": "gpt-4o",
"temperature": 0.7,
"max_tokens": 4096
})
# Execute the skill
result = skill.run(input_data={
"query": "Your input here"
})
print(result.output)
print(f"Tokens used: {result.usage.total_tokens}")
execute(input: dict, options: dict) -> ExecutionResultMain execution entry point for the skill.
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| input | dict | Yes | Input data for processing |
| options | dict | No | Execution options and parameters |
| timeout | int | No | Maximum execution time in seconds (default: 30) |
| retry | int | No | Number of retry attempts on failure (default: 3) |
validate(input: dict) -> ValidationResultValidates input data before execution.
validation = skill.validate({"query": "test input"})
if validation.is_valid:
result = skill.execute({"query": "test input"})
else:
print(f"Validation errors: {validation.errors}")
get_schema() -> dictReturns the JSON schema for input/output.
schema = skill.get_schema()
print(json.dumps(schema, indent=2))
| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| SKILLSHUB_API_KEY | Yes | - | Your SkillsHub API key |
| SKILLSHUB_MODEL | No | gpt-4o | Default model to use |
| SKILLSHUB_TIMEOUT | No | 30 | Request timeout in seconds |
| SKILLSHUB_LOG_LEVEL | No | info | Logging level |
Create a skillshub.config.json in your project root:
{
"skill": "docforge/Document-Template-Engine",
"version": "1.0.0",
"model": {
"provider": "openai",
"name": "gpt-4o",
"temperature": 0.7,
"max_tokens": 4096
},
"retry": {
"max_attempts": 3,
"backoff_factor": 2
},
"logging": {
"level": "info",
"format": "json"
}
}
from skillshub import load_skill
skill = load_skill("docforge/Document-Template-Engine")
result = skill.execute({
"input": "Hello, world!",
"mode": "standard"
})
print(result.output)
from skillshub import load_skill, SkillConfig
config = SkillConfig(
model="gpt-4o",
temperature=0.3,
max_tokens=8192,
streaming=True
)
skill = load_skill("docforge/Document-Template-Engine", config=config)
# Stream results
async for chunk in skill.stream_execute({"input": "Complex query..."}):
print(chunk, end="", flush=True)
from skillshub import Agent, load_skill
agent = Agent(
name="My Agent",
skills=[
load_skill("docforge/Document-Template-Engine"),
load_skill("skillsai/task-planner"),
],
model="gpt-4o"
)
response = agent.run("Complete this complex task...")
print(response.result)
print(f"Skills used: {response.skills_invoked}")
Performance metrics measured on standard evaluation datasets:
| Metric | Score | Benchmark | |--------|-------|-----------| | Accuracy | 94.2% | Industry standard: 89.5% | | Latency (p50) | 120ms | Target: <200ms | | Latency (p99) | 450ms | Target: <1000ms | | Throughput | 150 req/s | Target: >100 req/s | | Token Efficiency | 0.87 | Optimal: >0.80 |
Note: Benchmarks were conducted using GPT-4o on the SkillsHub evaluation framework v2.1.
We welcome contributions! Please follow these steps:
git checkout -b feature/my-improvementskillshub test# Clone the skill
skillshub clone docforge/Document-Template-Engine
cd Document-Template-Engine
# Install development dependencies
pip install -e ".[dev]"
# Run tests
pytest tests/ -v
# Run linting
ruff check .
mypy .
This skill is licensed under the MIT License. See LICENSE for details.
Category:other
Tags:tool, office-productivity, ai, automation