npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

prompttool-assets

v1.0.5

Published

Reusable prompt engineering assets including role descriptions, technical contexts, and analysis frameworks

Readme

prompttool-assets

A comprehensive collection of reusable prompt engineering assets including role descriptions, technical contexts, and analysis frameworks for AI-powered development workflows.

Features

  • 🎭 Role Descriptions: Pre-defined expert roles with detailed requirements and instructions, categorized into coding and non-coding roles
  • 🔍 Analysis Frameworks: Structured approaches for problem-solving including Chain-of-Thought prompting and custom frameworks
  • 🛠️ Technical Contexts: Domain-specific technical contexts for coding roles
  • 📝 Default Descriptions: Reusable baseline descriptions for common development tasks
  • 🎯 Analysis Cues: Collection of prompting techniques (Zero-shot CoT, Few-shot CoT, ReAct, etc.)
  • 🗺️ Preset Frameworks: Task-specific combinations of analysis cues for different development scenarios
  • 🏷️ Type-Safe Enums: Enum-based role definitions for better developer experience and consistency

Installation

npm install prompttool-assets

Role Categories

Coding Roles (8)

Roles that involve software development, technical implementation, and coding tasks:

  • Senior Software Developer
  • QA/Test Automation Engineer
  • DevOps/Release Engineer
  • Security Engineer
  • Analytics/Data Engineer
  • UI/UX Designer
  • Product Manager
  • Project Manager

Non-Coding Roles (5)

Roles focused on content creation, communication, and non-technical tasks:

  • Technical Writer
  • Grant Writer
  • Marketing & Communications
  • Accessibility Specialist
  • Prompt Engineer

Usage

Basic Usage with Enums

import { 
  CodingRoles,
  NonCodingRoles,
  RoleCategory,
  roleDescriptions,
  roleTechnicalContexts,
  getRoleCategory,
  isCodingRole
} from 'prompttool-assets';

// Get role description using enum
const devRole = roleDescriptions[CodingRoles.SENIOR_SOFTWARE_DEVELOPER];
const writerRole = roleDescriptions[NonCodingRoles.TECHNICAL_WRITER];

// Get technical context (only available for coding roles)
const devContext = roleTechnicalContexts[CodingRoles.SENIOR_SOFTWARE_DEVELOPER];

// Check role category
const category = getRoleCategory(CodingRoles.QA_TEST_AUTOMATION_ENGINEER);
console.log(category); // "Coding"

// Check if role is coding-related
const isCoding = isCodingRole(NonCodingRoles.GRANT_WRITER);
console.log(isCoding); // false

Analysis Frameworks and Cues

import {
  defaultAnalysisFramework,
  analysisCues,
  presetFrameworks,
  defaultDescriptions,
  defaultContext
} from 'prompttool-assets';

// Get analysis cues for Chain of Thought prompting
const zeroShotCot = analysisCues['Zero-shot CoT'];

// Get preset framework for UI development
const uiFramework = presetFrameworks['UI component or page'];

Working with All Roles

import { CodingRoles, NonCodingRoles, AllRoles } from 'prompttool-assets';

// Get all available roles
const allCodingRoles = Object.values(CodingRoles);
const allNonCodingRoles = Object.values(NonCodingRoles);

// Type-safe role selection
function selectRole(role: AllRoles) {
  return roleDescriptions[role];
}

TypeScript Support

The package includes comprehensive TypeScript support with enums and type definitions:

// Enums for type safety
enum RoleCategory {
  CODING = 'Coding',
  NON_CODING = 'Non-Coding'
}

enum CodingRoles {
  SENIOR_SOFTWARE_DEVELOPER = 'Senior Software Developer',
  QA_TEST_AUTOMATION_ENGINEER = 'QA/Test Automation Engineer',
  // ... etc
}

enum NonCodingRoles {
  TECHNICAL_WRITER = 'Technical Writer',
  GRANT_WRITER = 'Grant Writer',
  // ... etc
}

// Type definitions
type AllRoles = CodingRoles | NonCodingRoles;
type RoleDescriptions = Record<AllRoles, string>;
type RoleTechnicalContexts = Record<CodingRoles, string>;

// Helper functions
function getRoleCategory(role: AllRoles): RoleCategory;
function isCodingRole(role: AllRoles): role is CodingRoles;

Migration from v1.x

If you're upgrading from version 1.x, you'll need to update your imports:

// Before (v1.x)
const role = roleDescriptions['Senior Software Developer'];

// After (v2.x)
import { CodingRoles } from 'prompttool-assets';
const role = roleDescriptions[CodingRoles.SENIOR_SOFTWARE_DEVELOPER];

API Reference

Exports

  • CodingRoles - Enum of all coding-related roles
  • NonCodingRoles - Enum of all non-coding roles
  • RoleCategory - Enum for role categories (Coding/Non-Coding)
  • roleDescriptions - Object mapping all roles to their descriptions
  • roleTechnicalContexts - Object mapping coding roles to technical contexts
  • getRoleCategory(role) - Helper to get category for any role
  • isCodingRole(role) - Helper to check if role is coding-related
  • analysisCues - Collection of prompting techniques
  • presetFrameworks - Task-specific framework combinations
  • defaultAnalysisFramework - Default analysis approach
  • defaultDescriptions - Baseline descriptions
  • defaultContext - Default context settings

License

TRANSFORMATIONMATH