MR
Mayur Rathi
@mayurrathi
⭐ 5 GitHub stars

Azure Storage Queue Ts

|

mkdir -p ./skills/azure-storage-queue-ts && curl -sfL https://raw.githubusercontent.com/mayurrathi/awesome-agent-skills/main/skills/azure-storage-queue-ts/SKILL.md -o ./skills/azure-storage-queue-ts/SKILL.md

Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).

Skill Content

# @azure/storage-queue (TypeScript/JavaScript)


SDK for Azure Queue Storage operations — send, receive, peek, and manage messages in queues.


Installation


```bash

npm install @azure/storage-queue @azure/identity

```


**Current Version**: 12.x

**Node.js**: >= 18.0.0


Environment Variables


```bash

AZURE_STORAGE_ACCOUNT_NAME=<account-name>

AZURE_STORAGE_ACCOUNT_KEY=<account-key>

# OR connection string

AZURE_STORAGE_CONNECTION_STRING=DefaultEndpointsProtocol=https;AccountName=...

```


Authentication


DefaultAzureCredential (Recommended)


```typescript

import { QueueServiceClient } from "@azure/storage-queue";

import { DefaultAzureCredential } from "@azure/identity";


const accountName = process.env.AZURE_STORAGE_ACCOUNT_NAME!;

const client = new QueueServiceClient(

`https://${accountName}.queue.core.windows.net`,

new DefaultAzureCredential()

);

```


Connection String


```typescript

import { QueueServiceClient } from "@azure/storage-queue";


const client = QueueServiceClient.fromConnectionString(

process.env.AZURE_STORAGE_CONNECTION_STRING!

);

```


StorageSharedKeyCredential (Node.js only)


```typescript

import { QueueServiceClient, StorageSharedKeyCredential } from "@azure/storage-queue";


const accountName = process.env.AZURE_STORAGE_ACCOUNT_NAME!;

const accountKey = process.env.AZURE_STORAGE_ACCOUNT_KEY!;


const sharedKeyCredential = new StorageSharedKeyCredential(accountName, accountKey);

const client = new QueueServiceClient(

`https://${accountName}.queue.core.windows.net`,

sharedKeyCredential

);

```


SAS Token


```typescript

import { QueueServiceClient } from "@azure/storage-queue";


const accountName = process.env.AZURE_STORAGE_ACCOUNT_NAME!;

const sasToken = process.env.AZURE_STORAGE_SAS_TOKEN!;


const client = new QueueServiceClient(

`https://${accountName}.queue.core.windows.net${sasToken}`

);

```


Client Hierarchy


```

QueueServiceClient (account level)

└── QueueClient (queue level)

└── Messages (send, receive, peek, delete)

```


Queue Operations


Create Queue


```typescript

const queueClient = client.getQueueClient("my-queue");

await queueClient.create();


// Or create if not exists

await queueClient.createIfNotExists();

```


List Queues


```typescript

for await (const queue of client.listQueues()) {

console.log(queue.name);

}


// With prefix filter

for await (const queue of client.listQueues({ prefix: "task-" })) {

console.log(queue.name);

}

```


Delete Queue


```typescript

await queueClient.delete();


// Or delete if exists

await queueClient.deleteIfExists();

```


Get Queue Properties


```typescript

const properties = await queueClient.getProperties();

console.log("Approximate message count:", properties.approximateMessagesCount);

console.log("Metadata:", properties.metadata);

```


Set Queue Metadata


```typescript

await queueClient.setMetadata({

department: "engineering",

priority: "high",

});

```


Message Operations


Send Message


```typescript

const queueClient = client.getQueueClient("my-queue");


// Simple message

await queueClient.sendMessage("Hello, World!");


// With options

await queueClient.sendMessage("Delayed message", {

visibilityTimeout: 60, // Hidden for 60 seconds

messageTimeToLive: 3600, // Expires in 1 hour

});


// JSON message (must be string)

const task = { type: "process", data: { id: 123 } };

await queueClient.sendMessage(JSON.stringify(task));

```


Receive Messages


```typescript

// Receive up to 32 messages (default: 1)

const response = await queueClient.receiveMessages({

numberOfMessages: 10,

visibilityTimeout: 30, // 30 seconds to process

});


for (const message of response.receivedMessageItems) {

console.log("Message ID:", message.messageId);

console.log("Content:", message.messageText);

console.log("Dequeue Count:", message.dequeueCount);

console.log("Pop Receipt:", message.popReceipt);


// Process the message...


// Delete after processing

await queueClient.deleteMessage(mess

🎯 Best For

  • Claude users
  • Software engineers
  • Development teams
  • Tech leads

💡 Use Cases

  • Code quality improvement
  • Best practice enforcement

📖 How to Use This Skill

  1. 1

    Install the Skill

    Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.

  2. 2

    Load into Your AI Assistant

    Open Claude and reference the skill. Paste the SKILL.md content or use the system prompt tab.

  3. 3

    Apply Azure Storage Queue Ts to Your Work

    Open your project in the AI assistant and ask it to apply the skill. Start with a small module to verify the output quality.

  4. 4

    Review and Refine

    Review AI suggestions before committing. Run tests, check for regressions, and iterate on the skill output.

❓ Frequently Asked Questions

Is Azure Storage Queue Ts compatible with Cursor and VS Code?

Yes — this skill works with any AI coding assistant including Cursor, VS Code with Copilot, and JetBrains IDEs.

Do I need specific dependencies for Azure Storage Queue Ts?

Check the install command and Works With section. Most code skills only require the AI assistant and your codebase.

How do I install Azure Storage Queue Ts?

Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/azure-storage-queue-ts/SKILL.md, ready to use.

Can I customize this skill for my team?

Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.

⚠️ Common Mistakes to Avoid

Skipping validation

Always test AI-generated code changes, even for simple refactors.

Missing dependency updates

Check if the skill requires updated dependencies or new packages.

🔗 Related Skills