
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@agentica/prompt-jsx
Advanced tools
Prompt-JSX is a library that allows you to structure and write AI prompts using JSX syntax. By using a React-like syntax to compose prompts as components, it significantly improves the readability and reusability of prompts.
npm install @wrtnlabs/prompt-jsx
// tsconfig.json
{
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "@wrtnlabs/prompt-jsx"
}
}
import { jsx } from "@wrtnlabs/prompt-jsx";
const prompt = (
<prompt>
<instruction>
You are a friendly AI assistant. Please provide clear and accurate
responses to user questions.
</instruction>
<examples>
<input>What is Python?</input>
<output>
Python is a simple and easy-to-learn programming language. It is known
for its high readability and extensive library ecosystem.
</output>
</examples>
<context>
This conversation is for educational purposes, aimed at programming
beginners.
</context>
<persona>
You are a senior developer and educator with 10 years of experience. You
enjoy explaining complex concepts in simple terms.
</persona>
</prompt>
);
<prompt>
: Root element for the prompt<instruction>
: Main instructions for the AI<examples>
: Contains example inputs and outputs<context>
: Background information or context for the prompt<input>
: Example input<output>
: Example output<persona>
: Defines the AI's role or personality<role>
: Specifies the AI's expertise or role<br/>
: Line break<strong>
: Bold text<code lang="javascript">
: Code block (with optional language specification)Structured Prompts
Type Safety
Reusability
Maintainability
MIT
FAQs
A library that supports configuring AI prompts using JSX syntax.
The npm package @agentica/prompt-jsx receives a total of 2 weekly downloads. As such, @agentica/prompt-jsx popularity was classified as not popular.
We found that @agentica/prompt-jsx demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.