From grammarly-pack
Configure Grammarly local development with hot reload and testing. Use when setting up a development environment, configuring test workflows, or establishing a fast iteration cycle with Grammarly. Trigger with phrases like "grammarly dev setup", "grammarly local development", "grammarly dev environment", "develop with grammarly".
npx claudepluginhub flight505/skill-forge --plugin grammarly-packThis skill is limited to using the following tools:
Set up a development workflow for Grammarly API integrations with mocked responses and vitest.
Guides Next.js Cache Components and Partial Prerendering (PPR): 'use cache' directives, cacheLife(), cacheTag(), revalidateTag() for caching, invalidation, static/dynamic optimization. Auto-activates on cacheComponents: true.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Share bugs, ideas, or general feedback.
Set up a development workflow for Grammarly API integrations with mocked responses and vitest.
grammarly-integration/
├── src/grammarly/
│ ├── client.ts # API client with token management
│ ├── scoring.ts # Writing Score API
│ ├── detection.ts # AI + Plagiarism detection
│ └── types.ts # TypeScript interfaces
├── tests/
│ ├── fixtures/ # Mock API responses
│ └── scoring.test.ts
├── .env.local
└── package.json
import { describe, it, expect, vi } from 'vitest';
const mockFetch = vi.fn();
vi.stubGlobal('fetch', mockFetch);
describe('Writing Score', () => {
it('should return scores for valid text', async () => {
mockFetch.mockResolvedValueOnce({
ok: true,
json: async () => ({ overallScore: 85, engagement: 80, correctness: 90, clarity: 85, tone: 82 }),
});
// Test scoring logic
});
it('should reject text under 30 words', async () => {
mockFetch.mockResolvedValueOnce({ ok: false, status: 400, text: async () => 'Text too short' });
// Test error handling
});
});
See grammarly-sdk-patterns for production patterns.